This is a Docker setup for deploying your web application based on Django. It also contains tox file for testing your app.
You need to install Docker and Docker-Compose.
make sure your django app is configures for production use using this link.
docker-compose build
or make build
.
docker-compose run --rm djangoapp /bin/bash -c 'cd hello; ./manage.py makemigrations'
.
docker-compose run --rm djangoapp /bin/bash -c 'cd hello; ./manage.py migrate'
.
The static files are mounted wih the volumes of the docker-compose files! However, if you change the static files
make sure, you remove the volumes with docker volume prune
or run docker compsose down -v
. Those commands remove
the volumes and if you run docker compose build
again the volumes will be mounted again correctly 😄
You can inspect all listed mounted files in the menu.
Remember to pass DJANGO_SETTINGS_MODULE
in when you run it:
DJANGO_SETTINGS_MODULE=hello.settings.development docker compose up
.
or set it in the config/service/.env
make checksafety
make checkstyle
make test
make coverage
Software licensed under the ISC license.