services:
  caddy:
    image: caddy:2-alpine
    ports:
      - "80:80"
      - "443:443"
    environment:
      - DOMAIN=${DOMAIN:?DOMAIN environment variable is required}
    volumes:
      - ./data/Caddy/CaddyFile/Caddyfile.proxy:/etc/caddy/Caddyfile
      - ./data/Caddy/data:/data/caddy/
      - ./data/Caddy/config:/config/caddy/
    restart: unless-stopped

  beacon-web:
    image: ghcr.io/meshcore-beacon/beacon-web:latest
    environment:
      - VITE_API_BASE=${VITE_API_BASE:?VITE_API_BASE environment variable is required}
      - VITE_WS_URL=${VITE_WS_URL:?VITE_WS_URL environment variable is required}
      # Optional "All" map view; unset = world overview
      - VITE_MAP_CENTER=${VITE_MAP_CENTER:-}
      - VITE_MAP_ZOOM=${VITE_MAP_ZOOM:-}
      # Optional branding/customization; unset = all tabs, hidden themes hidden, name "BEACON"
      - VITE_DISABLED_TABS=${VITE_DISABLED_TABS:-}
      - VITE_ENABLED_THEMES=${VITE_ENABLED_THEMES:-}
      - VITE_APP_NAME=${VITE_APP_NAME:-BEACON}
      # Skip the once-per-session load splash; unset = shown
      - VITE_SKIP_SPLASH=${VITE_SKIP_SPLASH:-}
    restart: unless-stopped
