Browse Source

feat(docker): fail if local settings are unavailable

Nils Wisiol 8 years ago
parent
commit
28f5fe70e0
1 changed files with 3 additions and 0 deletions
  1. 3 0
      api/entrypoint.sh

+ 3 - 0
api/entrypoint.sh

@@ -6,6 +6,9 @@ host=dbapi; port=3306; n=120; i=0; while ! (echo > /dev/tcp/$host/$port) 2> /dev
 # wait for pdns api to come up
 host=nslord; port=8081; n=120; i=0; while ! (echo > /dev/tcp/$host/$port) 2> /dev/null; do [[ $i -eq $n ]] && >&2 echo "$host:$port not up after $n seconds, exiting" && exit 1; echo "waiting for $host:$port to come up"; sleep 1; i=$((i+1)); done
 
+# make sure local settings are available
+ls -lh /usr/src/app/desecapi/settings_local.py || exit 1
+
 # migrate database
 python manage.py migrate || exit 1