Compare commits
2 Commits
55e91cdfc9
...
facturatio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6afe340cce | ||
|
|
6f73a3951e |
@@ -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,17 +39,23 @@ 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 l’alias 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
|
||||
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
|
||||
ports:
|
||||
- "${APP_PORT:-8080}:3001"
|
||||
volumes:
|
||||
- uploads_data:/app/uploads
|
||||
networks:
|
||||
- santinova-network
|
||||
- web
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=web"
|
||||
- "traefik.http.routers.facturation-santinova.rule=Host(`facturation.recette.santinova-soft.org`)"
|
||||
- "traefik.http.routers.facturation-santinova.entrypoints=websecure"
|
||||
- "traefik.http.routers.facturation-santinova.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.facturation-santinova.loadbalancer.server.port=3001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3001/api/health"]
|
||||
interval: 30s
|
||||
@@ -71,9 +75,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 +87,5 @@ volumes:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
santinova-network:
|
||||
driver: bridge
|
||||
web:
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user