version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
      - NEXT_PUBLIC_BUNGALOW_NUMBER=${NEXT_PUBLIC_BUNGALOW_NUMBER:-1}
      - NEXT_PUBLIC_WIFI_NAME=${NEXT_PUBLIC_WIFI_NAME:-Lagon-WiFi}
      - NEXT_PUBLIC_WIFI_PASSWORD=${NEXT_PUBLIC_WIFI_PASSWORD:-motdepasse123}
      - NEXT_PUBLIC_GERANT_MESSAGE=${NEXT_PUBLIC_GERANT_MESSAGE:-Bienvenue dans notre pension de famille !}
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

