version: '3.8'

services:
  ghost-chess:
    build: .
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
      - NEXT_TELEMETRY_DISABLED=1
    restart: unless-stopped
    container_name: ghost-chess-app

  # Optional: Nginx reverse proxy for production
  nginx:
    image: nginx:alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - ./ssl:/etc/ssl/certs:ro  # SSL certificates if needed
    depends_on:
      - ghost-chess
    restart: unless-stopped
    container_name: ghost-chess-nginx
    profiles:
      - production