services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
      target: runner
    image: bitsia-next:latest
    container_name: bitsia-next
    ports:
      - "${PORT:-3000}:3000"
    environment:
      - NODE_ENV=production
      - NEXT_TELEMETRY_DISABLED=1
      # Add application env vars here or via an .env file:
      # - NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL}
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "wget", "-qO-", "http://localhost:3000/"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
