9ed22fb14a
- Dockerfile : copie config.json dans l'image (évite le problème de répertoire) - app.py : load_config() lit les variables d'environnement en priorité sur config.json - docker-compose.yml : converti en compose standard (sans section deploy Swarm) - docker-compose.swarm.yml : nouveau fichier dédié au déploiement Docker Swarm Variables supportées : OLLAMA_URL, OLLAMA_CLUSTER_MODEL, OLLAMA_LOCAL_MODEL, SITE_CALENDAR_URL, SITE_BASE_URL, AUTH_SESSION_SECRET, AUTH_USERS Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
703 B
Docker
27 lines
703 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Dépendances système minimales
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Dépendances Python
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Code applicatif
|
|
COPY app.py core.py config.json ./
|
|
COPY static/ ./static/
|
|
|
|
# Répertoires de données (sera écrasé par le volume en production)
|
|
RUN mkdir -p /app/data/cache /app/data/jobs /app/data/uploads
|
|
|
|
EXPOSE 8000
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \
|
|
CMD curl -sf http://localhost:8000/api/health || exit 1
|
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|