From afa6359bf599c734ce107271109e38a1dcf54b15 Mon Sep 17 00:00:00 2001 From: SimolZimol <70102430+SimolZimol@users.noreply.github.com> Date: Fri, 7 Aug 2026 21:07:22 +0200 Subject: [PATCH] modified: Dockerfile --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4e4c02c..439770f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,4 +31,7 @@ USER appuser EXPOSE 8000 # Startbefehl (Production: Gunicorn) -CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "--timeout", "120", "wsgi:app"] +# --preload: Die App (inkl. db.create_all() + Seed) wird einmal im Master geladen, +# bevor die Worker geforkt werden. Das verhindert den Startup-Race, bei dem mehrere +# Worker gleichzeitig dieselben Tabellen erstellen. +CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "--timeout", "120", "--preload", "wsgi:app"]