# ==========================================
# GridPilot Production Environment Example
# ==========================================
# Copy to `.env.production` and replace placeholders with real values.
#
# Do NOT commit real secrets.

# ------------------------------------------
# Runtime
# ------------------------------------------
NODE_ENV=production
NEXT_TELEMETRY_DISABLED=1

# ------------------------------------------
# API (NestJS)
# ------------------------------------------
GRIDPILOT_API_PERSISTENCE=postgres
# GRIDPILOT_API_BOOTSTRAP=true

# Prefer a single connection URL (Docker: host `db`)
DATABASE_URL=postgres://gridpilot_user:CHANGE_ME@db:5432/gridpilot_prod

# Postgres container vars (used by `docker-compose.prod.yml` -> `db`)
POSTGRES_DB=gridpilot_prod
POSTGRES_USER=gridpilot_user
POSTGRES_PASSWORD=CHANGE_ME

# Redis container vars (used by `docker-compose.prod.yml` -> `redis`)
REDIS_PASSWORD=CHANGE_ME

# ------------------------------------------
# Website (Next.js) - public (exposed to browser)
# ------------------------------------------
NEXT_PUBLIC_SITE_URL=https://your-domain.com

# Browser → API base URL.
# If nginx proxies `/api` to the API service, this is typically:
#   https://your-domain.com/api
NEXT_PUBLIC_API_BASE_URL=https://your-domain.com/api

NEXT_PUBLIC_DISCORD_URL=https://discord.gg/your-invite-code
NEXT_PUBLIC_X_URL=https://x.com/your-handle

# Optional site/legal metadata (defaults used when unset)
# NEXT_PUBLIC_SITE_NAME=GridPilot
# NEXT_PUBLIC_SUPPORT_EMAIL=support@your-domain.com
# NEXT_PUBLIC_SPONSOR_EMAIL=sponsors@your-domain.com
# NEXT_PUBLIC_LEGAL_COMPANY_NAME=Your Company GmbH
# NEXT_PUBLIC_LEGAL_VAT_ID=DE123456789
# NEXT_PUBLIC_LEGAL_REGISTERED_COUNTRY=DE
# NEXT_PUBLIC_LEGAL_REGISTERED_ADDRESS=Street 1, 12345 City

# ------------------------------------------
# Website (Next.js) - server (NOT exposed to browser)
# ------------------------------------------
API_BASE_URL=http://api:3000

# Vercel KV (required in production)
KV_REST_API_URL=https://your-kv-rest-api-url.vercel-storage.com
KV_REST_API_TOKEN=CHANGE_ME

# ------------------------------------------
# Automation / Companion (advanced)
# ------------------------------------------
# NOTE: `AUTOMATION_MODE` is deprecated.
# AUTOMATION_MODE=production
AUTOMATION_TIMEOUT=30000
RETRY_ATTEMPTS=3
SCREENSHOT_ON_ERROR=false