Self hosted FLOSS fitness/workout, nutrition and weight tracker
Don't start the server if errors occur
Roland Geiderd2fced3f77fb
diff --git a/extras/docker/production/entrypoint.sh b/extras/docker/production/entrypoint.shindex e1c33314a..764d90245 100644--- a/extras/docker/production/entrypoint.sh+++ b/extras/docker/production/entrypoint.sh@@ -15,7 +15,12 @@ thenexit 1fi-wger bootstrap --no-process-static+# Don't start the server if the bootstrap failed, e.g. because the database is+# not reachable yet. The restart policy will try again.+if ! wger bootstrap --no-process-static; then+ echo "Bootstrapping the application failed, not starting the server"+ exit 1+fi# Collect static filesif [ "$DJANGO_CLEAR_STATIC_FIRST" == "False" ]; then@@ -34,7 +39,10 @@ fiif [[ "$DJANGO_PERFORM_MIGRATIONS" == "True" ]];thenecho "Performing database migrations"- python3 manage.py migrate+ if ! python3 manage.py migrate; then+ echo "Database migrations failed, not starting the server"+ exit 1+ fifi# Sync exercises