- Clone repository
- Create an environment file (rename
.env.exampleto.envto get started)- Generate and update
SECRET_KEYfrom 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>:makemigrationsmigrate
- Local Development
Follow these instructions to recreate the Docker container from scratch.
- Install Python
- Create
Dockerfileand add configuration - Create
scriptsfolder - Create
scripts/run.shand add configuration - Create
docker-compose.ymland add configuration - Test, run
docker compose up
- Create
proxyfolder - Create
proxy/default.conf.tpland add configuration - Create
proxy/uwsgi_paramsand copy configuration from https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html#what-is-the-uwsgi-params-file - Create
proxy/Dockerfileand add configuration - Create
proxy/run.shand add configuration
- Configure
SECRET_KEYandDEBUGto use envrionment variables - Configure
STATIC_URL,MEDIA_URL,STATIC_ROOT, andMEDIA_ROOTto point to the correct folders
- Create
docker-compose-deploy.ymland add configuration