androiddrew
87b123f1d3
Whitenoise is not suitable for delivery of media. In order to deliver both static and media content Nginx was added as a service to the docker-compose setup. The CMS and Nginx containers share mounts for static and media directory access. |
6 years ago | |
---|---|---|
.. | ||
cms | 6 years ago | |
home | 6 years ago | |
search | 6 years ago | |
Dockerfile | 6 years ago | |
README.md | 6 years ago | |
entrypoint.sh | 6 years ago | |
manage.py | 6 years ago | |
requirements.txt | 6 years ago |
README.md
Datasketch CMS
This service is built using the Wagtail framework.
Middleware
Since this application is being deployed to a Docker swarm it utilizes Whitenoise and the Django specific whitenoise middleware to deliver static content. This solution is suitable for serving low traffic static content. To improve performance an Nginx reverse proxy could leverage HTTP caching or could be configured to serve all static content directly.
Environmental Variables
The follow environment variables must be set for development. Note that the DB_PASSWD for production must be a docker secret.
DB_HOST=<hostname for database>
DB_PASSWD=ec<Password for datasketch user>
In production you must set the DJANGO_SETTINGS_MODULE
to the appropriate module:
DJANGO_SETTINGS_MODULE=cms.settings.production
Migrations
The manage.py
file is used to upgrade the backend database. You will need to log into the container on the appropriate host and execute the command python manage.py migrate
manually.