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 deployto build, scale and deploy containers on the servermake buildto initially build the containersmake upto deploy the containersmake stopto turn off containersmake cleanto remove the containersmake shell-'container'to drop into that container's shellmake log-'container'to get a full log of the containermake collectstaticyes, exactly that!make migrateyes, exactly that!make makemigrationsyes, 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.