- Clone repository
- Create an environment file (rename
.env.example
to.env
to get started)- Generate and update
SECRET_KEY
from django.core.management import utils print(utils.get_random_secret_key())
- Add site URLs to
ALLOWED_HOSTS
- Configure the DB parameters
- Generate and update
- Run
- Local Development
docker compose up
- Production
docker compose -f docker-compose-deploy.yml up
--build
- Builds the image before starting the container
- Local Development
- Run Commands
- Local Development
docker compose run app python manage.py <command>
- Production
docker compose -f docker-compose-deploy.yml run app python manage.py <command>
<command>
:makemigrations
migrate
- Local Development
Follow these instructions to recreate the Docker container from scratch.
- Install Python
- Create
Dockerfile
and add configuration - Create
scripts
folder - Create
scripts/run.sh
and add configuration - Create
docker-compose.yml
and add configuration - Test, run
docker compose up
- Create
proxy
folder - Create
proxy/default.conf.tpl
and add configuration - Create
proxy/uwsgi_params
and copy configuration from https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html#what-is-the-uwsgi-params-file - Create
proxy/Dockerfile
and add configuration - Create
proxy/run.sh
and add configuration
- Configure
SECRET_KEY
andDEBUG
to use envrionment variables - Configure
STATIC_URL
,MEDIA_URL
,STATIC_ROOT
, andMEDIA_ROOT
to point to the correct folders
- Create
docker-compose-deploy.yml
and add configuration