diff --git a/entrypoint.sh b/entrypoint.sh index 288fb4c..3f82cc6 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,6 @@ #!/bin/sh +set -e + # Fix ownership of the data directory so appuser can write the database. # This runs as root (no USER directive in Dockerfile) and is safe because # we immediately drop privileges via gosu before starting the app. @@ -9,4 +11,8 @@ chown -R appuser:appuser "$DATA_DIR" envsubst < /app/templates/index.html.template > /app/templates/index.html # Drop to appuser and start Gunicorn -exec gosu appuser gunicorn --bind 0.0.0.0:8000 app:app --workers ${GUNICORN_WORKERS:-3} +exec gosu appuser gunicorn \ + --bind 0.0.0.0:8000 \ + --workers ${GUNICORN_WORKERS:-3} \ + --timeout 30 \ + app:app