This commit is contained in:
mahek 2025-07-25 17:17:59 +02:00
parent a49db6e4ae
commit b91b7c5b88
7 changed files with 11 additions and 318 deletions

View file

@ -1,11 +1,7 @@
version: '3.8'
services:
# Service MongoDB
# Service MongoDB sans healthcheck personnalisé
mongodb:
build:
context: ./mongodb
dockerfile: Dockerfile
image: mongo:latest
container_name: managerr-mongodb
restart: unless-stopped
volumes:
@ -18,8 +14,15 @@ services:
- "27017:27017"
networks:
- managerr-network
# Healthcheck simple intégré (utilisera les commandes disponibles dans l'image)
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh mongodb://localhost:27017/test --quiet || exit 1
interval: 10s
timeout: 10s
retries: 5
start_period: 30s
# Service Backend
# Service Backend avec script d'attente
backend:
build:
context: ./backend
@ -27,8 +30,7 @@ services:
container_name: managerr-backend
restart: unless-stopped
depends_on:
mongodb:
condition: service_healthy
- mongodb
environment:
- NODE_ENV=development
- PORT=5000