fix(deploy): utiliser le nom MySQL unique sur le réseau web

This commit is contained in:
Manus Automation
2026-08-18 09:22:38 +00:00
parent 55e91cdfc9
commit 6f73a3951e

View File

@@ -13,12 +13,10 @@ services:
MYSQL_DATABASE: facturation_santinova
MYSQL_CHARACTER_SET_SERVER: utf8mb4
MYSQL_COLLATION_SERVER: utf8mb4_unicode_ci
ports:
- "${DB_PORT:-3306}:3306"
volumes:
- mysql_data:/var/lib/mysql
networks:
- santinova-network
- web
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_ROOT_PASSWORD:-santinova_db_pass}"]
interval: 10s
@@ -41,7 +39,8 @@ services:
environment:
NODE_ENV: production
PORT: 3001
DATABASE_URL: mysql://root:${DB_ROOT_PASSWORD:-santinova_db_pass}@db:3306/facturation_santinova
# Le réseau web est partagé par plusieurs projets : ne jamais utiliser lalias générique `db`.
DATABASE_URL: mysql://root:${DB_ROOT_PASSWORD:-santinova_db_pass}@santinova-facturation-db:3306/facturation_santinova
JWT_SECRET: ${JWT_SECRET:-santinova-jwt-secret-change-in-production}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-24h}
UPLOAD_DIR: /app/uploads
@@ -51,7 +50,7 @@ services:
volumes:
- uploads_data:/app/uploads
networks:
- santinova-network
- web
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/api/health"]
interval: 30s
@@ -71,9 +70,9 @@ services:
db:
condition: service_healthy
environment:
DATABASE_URL: mysql://root:${DB_ROOT_PASSWORD:-santinova_db_pass}@db:3306/facturation_santinova
DATABASE_URL: mysql://root:${DB_ROOT_PASSWORD:-santinova_db_pass}@santinova-facturation-db:3306/facturation_santinova
networks:
- santinova-network
- web
restart: "no"
volumes:
@@ -83,5 +82,5 @@ volumes:
driver: local
networks:
santinova-network:
driver: bridge
web:
external: true