Files
notytex/docker-compose.yml
Bertrand Benjamin 634b6958bb feat: Ajout configuration Docker complète pour v2
 Fichiers Docker ajoutés:
- backend/Dockerfile: Image Python 3.11 avec uv et FastAPI
- frontend/Dockerfile: Build multi-stage avec Nginx
- docker-compose.yml: Orchestration complète des services
- frontend/nginx.conf: Configuration Nginx avec proxy API

📝 Documentation:
- DOCKER.md: Guide complet de déploiement Docker (monitoring, backup, prod)
- README.md: Section Docker ajoutée
- .env.docker: Template mis à jour pour v2

🔧 Configuration:
- .dockerignore pour backend et frontend
- Volume data/ pour la base de données
- Healthchecks pour les deux services
- Réseau bridge dédié

🚀 Démarrage simplifié:
  cp .env.docker .env
  docker-compose up -d

Accès: http://localhost (frontend) + http://localhost:8000 (API)
2025-11-25 21:22:41 +01:00

56 lines
1.2 KiB
YAML

version: '3.8'
services:
# Backend FastAPI
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: notytex-backend
restart: unless-stopped
ports:
- "8000:8000"
environment:
- DATABASE_URL=sqlite+aiosqlite:////data/school_management.db
- SECRET_KEY=${SECRET_KEY:-change-me-in-production-min-32-chars}
- CORS_ORIGINS=["http://localhost","http://localhost:80","http://localhost:3000"]
- LOG_LEVEL=INFO
volumes:
- ./data:/data
- ./backend:/app
networks:
- notytex-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v2/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Frontend Vue.js + Nginx
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: notytex-frontend
restart: unless-stopped
ports:
- "80:80"
depends_on:
- backend
networks:
- notytex-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
interval: 30s
timeout: 10s
retries: 3
networks:
notytex-network:
driver: bridge
volumes:
data:
driver: local