fix: bind mounts persistants pour SQLite et modeles YOLO (evite perte de donnees au redeploi)
This commit is contained in:
+5
-9
@@ -25,8 +25,8 @@ services:
|
|||||||
CORS_ORIGIN: ${CORS_ORIGIN:-*}
|
CORS_ORIGIN: ${CORS_ORIGIN:-*}
|
||||||
UPLOADS_DIR: /app/data/uploads
|
UPLOADS_DIR: /app/data/uploads
|
||||||
volumes:
|
volumes:
|
||||||
# SQLite DB + uploads — persistant entre les redémarrages
|
# SQLite DB + uploads — bind mount sur l'hôte (survit aux redéploiements)
|
||||||
- shoottracker_data:/app/data
|
- /opt/shoottracker/data:/app/data
|
||||||
depends_on:
|
depends_on:
|
||||||
shoottracker-ai:
|
shoottracker-ai:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -52,8 +52,8 @@ services:
|
|||||||
PORT: 8000
|
PORT: 8000
|
||||||
YOLO_MODEL_PATH: yolov8n.pt
|
YOLO_MODEL_PATH: yolov8n.pt
|
||||||
volumes:
|
volumes:
|
||||||
# Cache du modèle YOLOv8 pour éviter re-téléchargement
|
# Cache du modèle YOLOv8 — bind mount sur l'hôte (évite re-téléchargement à chaque redéploiement)
|
||||||
- yolo_models:/root/.config/Ultralytics
|
- /opt/shoottracker/yolo-models:/root/.config/Ultralytics
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-qO-", "http://localhost:8000/health"]
|
test: ["CMD", "wget", "-qO-", "http://localhost:8000/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -61,8 +61,4 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
start_period: 60s
|
start_period: 60s
|
||||||
|
|
||||||
volumes:
|
# Pas de volumes nommés — bind mounts définis directement dans chaque service
|
||||||
shoottracker_data:
|
|
||||||
driver: local
|
|
||||||
yolo_models:
|
|
||||||
driver: local
|
|
||||||
|
|||||||
Reference in New Issue
Block a user