cookiecutter-django/{{cookiecutter.project_slug}}/compose/production/django/start
James Williams 89f85f1255
- configure compressor when not using s3
- update django start script to compress if using whitenoise and compress enabled

- add to contributors.rst
2020-02-28 15:59:14 +00:00

16 lines
355 B
Bash

#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
python /app/manage.py collectstatic --noinput
{%- if cookiecutter.use_whitenoise == 'y' and cookiecutter.use_compressor == 'y' %}
if [ "${COMPRESS_ENABLED:-}" = "True" ];
then
python /app/manage.py compress
fi
{%- endif %}
/usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app