"feat: Update project structure and Dockerfiles for frontend integration"
This commit is contained in:
@@ -1 +1,49 @@
|
||||
|
||||
# 🔧 MYP Backend - Entwicklungs-Container
|
||||
# Optimiert für Hot Reload und Debugging
|
||||
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Arbeitsverzeichnis setzen
|
||||
WORKDIR /app
|
||||
|
||||
# System-Abhängigkeiten installieren
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
sqlite3 \
|
||||
wget \
|
||||
git \
|
||||
build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Python-Abhängigkeiten installieren
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Entwicklungs-spezifische Pakete
|
||||
RUN pip install --no-cache-dir \
|
||||
watchdog \
|
||||
flask-debugtoolbar \
|
||||
pytest \
|
||||
pytest-cov \
|
||||
black \
|
||||
flake8
|
||||
|
||||
# Verzeichnisse erstellen
|
||||
RUN mkdir -p logs instance
|
||||
|
||||
# Umgebungsvariablen für Entwicklung
|
||||
ENV FLASK_APP=app.py
|
||||
ENV FLASK_ENV=development
|
||||
ENV FLASK_DEBUG=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Port freigeben
|
||||
EXPOSE 5000 5555
|
||||
|
||||
# Health Check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
||||
CMD curl -f http://localhost:5000/health || exit 1
|
||||
|
||||
# Entwicklungs-Startbefehl (wird durch docker-compose überschrieben)
|
||||
CMD ["flask", "run", "--host=0.0.0.0", "--port=5000", "--reload", "--debugger"]
|
Reference in New Issue
Block a user