Everything default but Postgres
-
Update all the environment variables in the env. and docker-compose.yml files.
-
Build the images and run the containers:
$ docker-compose up --build
The dev server will be available on http://localhost:8000
You can remake the Django project inside ./app once the docker container is running. This script will regenerate a new project, clean and rebuild the container.
-
(Optional) Update ./app/requirementes.txt versions.
-
Execute:
$ chmod +x remake_project.sh $ sudo ./remake_project.sh <project_name>
Postgres + gunicorn + nginx.
-
Update all the environment variables in the env. files.
-
Build the images and run the containers:
$ docker-compose -f docker-compose.prod.yml up --build
The production server will be available on http://localhost:1337.
There is no bind mounts here, only volumes, so for any changes in the code to take effect, the container must be rebuilt.