🎉 feat: update Dockerfile and scripts for improved functionality

This commit is contained in:
2025-05-01 16:05:52 +02:00
parent 631619ccb4
commit 4982cddeef
4 changed files with 42 additions and 14 deletions

View File

@@ -4,7 +4,7 @@ FROM python:3.11-slim
# Arbeitsverzeichnis in Container
WORKDIR /app
# Systemabhängigkeiten (falls erforderlich)
# Systemabhängigkeiten installieren und Verzeichnisse anlegen
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc && \
rm -rf /var/lib/apt/lists/* && \
@@ -18,14 +18,16 @@ RUN pip install --upgrade pip && \
# Anwendungscode kopieren
COPY . .
# Berechtigungen für database-Ordner
RUN chmod -R 777 /app/database
# Exponiere Port 5000 für Flask
EXPOSE 5000
# Setze Umgebungsvariablen
ENV FLASK_APP=app.py
ENV FLASK_ENV=production
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Wenn eine .env im Arbeitsverzeichnis vorhanden ist, wird sie automatisch von Flask geladen
# Startkommando
# Startkommando mit spezifischen Flags für Produktion
CMD ["python", "app.py"]