This project include the following:
- Nginx container as a web server
- Python Django container for the backend
- React JS container for the frontend
- PostgreSQL container for the database
First steps:
- Modify and copy the environment file:
$ cp .env.template $ cp frontend/.env.template frontend/.env
- Modify and copy the local_settings file:
$ cp backend/backend/local_settings.py.tpl backend/backend/local_settings.py
- Build and run the project
$ make deploy
To deploy locally or remotely you'll need docker-compose and docker-engine
Once set up you can run make [tab][tab]
to see a list of actions:
make deploy
to build, scale and deploy containers on the servermake build
to initially build the containersmake up
to deploy the containersmake stop
to turn off containersmake clean
to remove the containersmake shell-'container'
to drop into that container's shellmake log-'container'
to get a full log of the containermake collectstatic
yes, exactly that!make migrate
yes, exactly that!make makemigrations
yes, exactly that!
Normally you'll only run make build
only once in a while, make up
every time you start your env.
make collectstatic
only if statics were changed or added, and make migrate
only if there are new migrations or you have a brand new db.