chore: store database and media on host bind mounts
CD — Déploiement / deploy (push) Failing after 1s

Move MariaDB and media data out of /var/lib/docker onto the host disk via CLOUD_DB_DIR and CLOUD_MEDIA_DIR (default ../db, ../media). Only the frontend build output remains a named volume.
This commit is contained in:
2026-10-16 10:47:12 +02:00
parent 37e0b542ae
commit a22f18d860
5 changed files with 29 additions and 10 deletions
+7 -4
View File
@@ -85,7 +85,8 @@ services:
timeout: 5s
retries: 5
volumes:
- db_data:/var/lib/mysql
# Donnees MariaDB : dossier hote (gros disque), pas le volume Docker.
- ${CLOUD_DB_DIR:-../db}:/var/lib/mysql
<<: *restart
migrate:
@@ -152,7 +153,8 @@ services:
ports:
- "127.0.0.1:${COHAISE_API_PORT:-3101}:8080"
volumes:
- media_data:/data/media
# Fichiers medias : dossier hote (gros disque), pas le volume Docker.
- ${CLOUD_MEDIA_DIR:-../media}:/data/media
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8080/healthz"]
interval: 15s
@@ -162,6 +164,7 @@ services:
<<: *restart
volumes:
# Seul volume Docker restant : la sortie de build du front (petite, ephemere).
# La base et les medias sont des bind mounts vers l'hote (CLOUD_DB_DIR,
# CLOUD_MEDIA_DIR) afin de vivre sur le gros disque et non dans /var/lib/docker.
app_data:
db_data:
media_data: