#!/usr/bin/env bash cd /usr/src/app if ! python manage.py migrate ; then echo "Unable to migrate" [[ "$#" -eq 0 ]] && exit 1 fi if [[ "$#" -gt 0 ]]; then exec "$@" else exec supervisord -c /usr/src/app/docker/supervisord.conf fi