From 7e158a269c0b412911ddc8b716caaac355caeafd Mon Sep 17 00:00:00 2001 From: winkidney Date: Thu, 14 Apr 2022 08:08:56 -0700 Subject: [PATCH] feature: use env to config django's settings path --- docker/scripts/start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/scripts/start.sh b/docker/scripts/start.sh index f3f05fc..17d08f2 100755 --- a/docker/scripts/start.sh +++ b/docker/scripts/start.sh @@ -9,18 +9,19 @@ # Updated: Aug 19th, 2014 # ----------------------------------------------------------------------------- PROJECT_ROOT="/pinry" +export DJANGO_SETTINGS_MODULE=pinry.settings.docker bash ${PROJECT_ROOT}/docker/scripts/bootstrap.sh # If static files don't exist collect them cd ${PROJECT_ROOT} -python manage.py collectstatic --noinput --settings=pinry.settings.docker +python manage.py collectstatic --noinput # If database doesn't exist yet create it if [ ! -f /data/production.db ] then cd ${PROJECT_ROOT} - python manage.py migrate --noinput --settings=pinry.settings.docker + python manage.py migrate --noinput fi # Fix all settings after all commands are run