version: '3.8' services: web: build: . expose: - "3000" environment: - NODE_ENV=production - PORT=3000 - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/shokuninmarche - REDIS_URL=redis://redis:6379 - JWT_SECRET=${JWT_SECRET:-changeme_in_production} - JWT_REFRESH_SECRET=${JWT_REFRESH_SECRET:-changeme_refresh_in_production} depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped postgres: image: postgres:15-alpine expose: - "5432" environment: - POSTGRES_DB=shokuninmarche - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped redis: image: redis:7-alpine expose: - "6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped volumes: postgres_data: redis_data: