#!/bin/bash
#
# This script is designed to be run inside the container
#
cd /app

# run an idempotent database migration
sudo -E -u deis ./manage.py syncdb --migrate --noinput

# spawn a gunicorn server in the foreground
sudo -E -u deis ./manage.py run_gunicorn -b 0.0.0.0 -w 8 -t 600 -n deis --log-level debug # -k gevent
