26 lines
562 B
Docker
26 lines
562 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Installer les dépendances Python
|
|
COPY backend/src/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copier le code backend
|
|
COPY backend/src/ /app/
|
|
|
|
# Copier le frontend
|
|
COPY frontend /app/frontend
|
|
COPY components /app/components
|
|
COPY img /app/img
|
|
COPY index.html /app/
|
|
COPY *.json /app/
|
|
COPY vite.config.ts /app/
|
|
|
|
# Port Flask
|
|
EXPOSE 5000
|
|
|
|
# Définir PYTHONPATH pour que les imports relatifs fonctionnent
|
|
ENV PYTHONPATH=/app:$PYTHONPATH
|
|
|
|
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "api:app"]
|