20 lines
No EOL
514 B
Bash
Executable file
20 lines
No EOL
514 B
Bash
Executable file
#!/bin/bash
|
|
set -ex
|
|
|
|
if [ "$1" == "" ]; then
|
|
echo "Startup command not set. Exiting"
|
|
exit;
|
|
fi
|
|
|
|
if [ "$DJANGO_SETTINGS_MODULE" == "" ]; then
|
|
echo "Environment variable 'DJANGO_SETTINGS_MODULE' not set. Exiting."
|
|
exit;
|
|
else
|
|
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
|
|
fi
|
|
|
|
echo "Running deploy.sh... (if you get a APP_REGISTRY_NOT_READY error, there's probably an error in settings.py)"
|
|
/deploy.sh
|
|
|
|
echo "Environment is correct and deploy.sh has been run - executing command: '$@'"
|
|
exec "$@" && exit 0 |