feat: ShootTracker SQLite+JWT+YOLOv8

This commit is contained in:
ShootTracker Deploy
2026-04-30 22:44:27 +02:00
commit 2578cb6ec2
55 changed files with 5759 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
version: '3.8'
# ─── Développement local ──────────────────────────────────────────────────────
# Usage : docker-compose up --build
#
# Nécessite un fichier .env à la racine avec :
# JWT_SECRET=<clé secrète longue et aléatoire>
# CORS_ORIGIN=http://localhost:5173 (optionnel)
services:
# ─── App principale (frontend + backend) ────────────────────────────────────
shoottracker-app:
build:
context: .
dockerfile: Dockerfile
container_name: shoottracker-app
restart: unless-stopped
ports:
- "3001:3001"
environment:
NODE_ENV: production
PORT: 3001
JWT_SECRET: ${JWT_SECRET:-changeme_use_a_real_secret_in_production}
AI_SERVICE_URL: http://shoottracker-ai:8000
CORS_ORIGIN: ${CORS_ORIGIN:-*}
UPLOADS_DIR: /app/data/uploads
volumes:
# SQLite DB + uploads — persistant entre les redémarrages
- shoottracker_data:/app/data
depends_on:
shoottracker-ai:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
# ─── Microservice IA ─────────────────────────────────────────────────────────
shoottracker-ai:
build:
context: ./ai-service
dockerfile: Dockerfile
container_name: shoottracker-ai
restart: unless-stopped
ports:
- "8000:8000"
environment:
PORT: 8000
YOLO_MODEL_PATH: yolov8n.pt
volumes:
# Cache du modèle YOLOv8 pour éviter re-téléchargement
- yolo_models:/root/.config/Ultralytics
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8000/health"]
interval: 30s
timeout: 15s
retries: 3
start_period: 60s
volumes:
shoottracker_data:
driver: local
yolo_models:
driver: local