pip install pre-commit
pip install black
pip install mypy
pip install flake8
pre-commit install
The following commands should be issued from the root directory of the project.
docker-compose up -d --build
docker-compose exec web python manage.py createsuperuser
If you make some changes in model.py you:
docker-compose exec web python manage.py makemigrations d17map
docker-compose exec web python manage.py migrate
To enter database: (username and dbname from .env.dev)
docker-compose exec db psql --username=hello_django --dbname=hello_django_dev
Sometimes docker has problems with itself, but there is a couple of commands which you can try to fix it
docker compose down -v
- this command stops containers and removes them.docker system prune
- removes all dangling/untagged resourcesdocker system prune -a
- removes a little bit more ;)docker volume rm <your volume name>
- obvious (usedocker volume ls
to list all volumes)docker volume prune
- removes all dangling volumes
Other useful commands may be found here