# Datasketch CMS

This service is built using the [Wagtail](http://docs.wagtail.io/en/v2.3/) framework.

## 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=<Password for datasketch user>
```

In production you must set the `DJANGO_SETTINGS_MODULE` to the appropriate module:

```
DJANGO_SETTINGS_MODULE=cms.settings.production
```

## Migrations and collectstatic
Migrations and the collection of static content is managed through the `entrypoint.sh` script. On start up the cms container will check for the availability of the Postgres server, then run the migration and static file collection processes. The static files in production will be written to a persistent location on a NAS device. An Nginx service will mount that same static location and serve content.
