description "{{deployment_name}} [{{mode}}]"
start on runlevel [2345]
stop on runlevel [06]
respawn
respawn limit 10 5
chdir /home/{{deployment_name}}/{{mode}}
env PYTHON_PATH="/home/{{deployment_name}}/.venv-{{mode}}/"
env DJANGO_SETTINGS_MODULE="{{deployment_name}}.settings"
env DJANGO_SECRET_KEY="{{secret_key}}"
env DATABASE_URL="postgres://{{deployment_name}}:{{dbpass}}@localhost/{{deployment_name}}_{{mode}}"
env DJANGO_CONFIGURATION="{{mode}}"

exec /home/{{deployment_name}}/.venv-{{mode}}/bin/gunicorn {{deployment_name}}.wsgi:application -c /etc/gunicorn_{{deployment_name}}_{{mode}}.py