Add entrypoint.sh: wait for MariaDB before starting Flask
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -19,6 +19,7 @@ COPY backend/templates ./backend/templates
|
||||
# Store DB config in a docker-friendly location (/config), override via DB_CONFIG_PATH env if needed
|
||||
COPY backend/config /config
|
||||
COPY backend/requirements.txt ./requirements.txt
|
||||
COPY backend/entrypoint.sh ./entrypoint.sh
|
||||
|
||||
# Frontend aus Build-Stage übernehmen
|
||||
COPY --from=frontend-build /app/frontend/dist ./frontend/dist
|
||||
@@ -26,9 +27,12 @@ COPY --from=frontend-build /app/frontend/dist ./frontend/dist
|
||||
# Python-Abhängigkeiten installieren
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Entrypoint ausführbar machen
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
|
||||
# Flask starten
|
||||
WORKDIR /app/backend
|
||||
ENV PYTHONPATH=/app/backend
|
||||
ENV DB_CONFIG_PATH=/config/db_config.json
|
||||
EXPOSE 5000
|
||||
CMD ["python", "app.py"]
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user