transfer from private server/git server

This commit is contained in:
M1n-0
2026-08-21 09:12:02 +02:00
parent 45c8982178
commit 6ecb014238
75 changed files with 4344 additions and 274 deletions

View File

@@ -1,8 +1,21 @@
FROM python:3.11
# syntax=docker/dockerfile:1
FROM python:3.11-slim
WORKDIR /web
COPY . /web
# libmagic1 : bibliothèque système requise par python-magic (détection MIME
# par analyse binaire, étape 3 du module fichiers).
RUN apt-get update \
&& apt-get install -y --no-install-recommends libmagic1 \
&& rm -rf /var/lib/apt/lists/*
RUN pip install flask flask_sqlalchemy pymysql authlib requests
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
CMD ["python", "app.py"]
COPY . .
EXPOSE 5000
# Gunicorn multi-worker en production (Bloc 1 - C6 : workers = 2*CPU + 1).
# GUNICORN_CMD_ARGS permet de surcharger la config sans reconstruire l'image.
CMD ["gunicorn", "--workers=4", "--worker-class=gthread", "--threads=2", \
"--bind=0.0.0.0:5000", "app:app"]