aboutsummaryrefslogtreecommitdiff
path: root/ci-amd64-llp-alpine/docker_run.sh
diff options
context:
space:
mode:
authorBenjamin Copeland <ben.copeland@linaro.org>2018-05-08 12:03:12 +0100
committerBenjamin Copeland <ben.copeland@linaro.org>2018-05-08 12:03:12 +0100
commit838978c9ffa6b7c73dc0bfe4e3ee72371a058fa9 (patch)
tree7101439bd549e864cf2785a8d04ddb6150038ec5 /ci-amd64-llp-alpine/docker_run.sh
parent8fae4965bc1908f5dab1673d138c2ae567504c40 (diff)
LLP: Update docker_run.sh
Move the collectstatic and migration out of the block so we can use it in both DEBUG and Production mode Change-Id: Id725dee008cc19fe27f92dd6f1031031700000ec
Diffstat (limited to 'ci-amd64-llp-alpine/docker_run.sh')
-rwxr-xr-xci-amd64-llp-alpine/docker_run.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/ci-amd64-llp-alpine/docker_run.sh b/ci-amd64-llp-alpine/docker_run.sh
index 52c27ae1..8e35b7a4 100755
--- a/ci-amd64-llp-alpine/docker_run.sh
+++ b/ci-amd64-llp-alpine/docker_run.sh
@@ -12,15 +12,14 @@ if [ -z "$DJANGO_DEBUG" ] ; then
echo "$html_header" >> /srv/header_override.html
fi
- if [ ! -z "$DJANGO_MIGRATE" ]; then
- python $APPDIR/manage.py migrate --noinput
- fi
- if [ ! -z "$DJANGO_COLLECTSTATIC" ]; then
- python $APPDIR/manage.py collectstatic --noinput
- fi
-
exec /usr/bin/gunicorn -w4 -b 0.0.0.0:$PORT $LLP_APP
fi
-python $APPDIR/manage.py migrate --noinput --settings=settings
-exec python $APPDIR/manage.py runserver 0.0.0.0:8080 --settings=settings
+if [ ! -z "$DJANGO_MIGRATE" ]; then
+ python $APPDIR/manage.py migrate --noinput --settings=$DJANGO_SETTINGS_MODULE
+fi
+if [ ! -z "$DJANGO_COLLECTSTATIC" ]; then
+ python $APPDIR/manage.py collectstatic --noinput --settings=$DJANGO_SETTINGS_MODULE
+fi
+
+exec python $APPDIR/manage.py runserver 0.0.0.0:8080 --settings=$DJANGO_SETTINGS_MODULE