services:
  dashboard:
    build: .
    ports:
      - "127.0.0.1:3000:3000"
    environment:
      - NODE_ENV=production
      - DATABASE_URL=file:/app/db/dashboard.db
      - DATABASE_PATH=/app/db/dashboard.db
      - NEXTAUTH_URL=https://dashboard.firstlight.am
      - NEXTAUTH_SECRET=${NEXTAUTH_SECRET:?Set NEXTAUTH_SECRET in .env}
      # Azure AD (optional — omit to run without auth)
      - AZURE_AD_CLIENT_ID=${AZURE_AD_CLIENT_ID:-}
      - AZURE_AD_CLIENT_SECRET=${AZURE_AD_CLIENT_SECRET:-}
      - AZURE_AD_TENANT_ID=${AZURE_AD_TENANT_ID:-}
      - ADMIN_EMAILS=${ADMIN_EMAILS:-}
    volumes:
      - db-data:/app/db
    restart: unless-stopped

volumes:
  db-data:
