# Database
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=15432
POSTGRES_DB=sammo
POSTGRES_USER=sammo
POSTGRES_PASSWORD=change-me
# POSTGRES_SCHEMA=public
# DATABASE_URL=postgresql://sammo:change-me@127.0.0.1:15432/sammo?schema=public
# GATEWAY_DATABASE_URL=postgresql://sammo:change-me@127.0.0.1:15432/sammo?schema=public
# Direct CLI/process fallback. Managed PM2 roles use the role-specific values below first.
# POSTGRES_POOL_MAX=10
GAME_API_POSTGRES_POOL_MAX=4
TURN_DAEMON_POSTGRES_POOL_MAX=2
AUCTION_WORKER_POSTGRES_POOL_MAX=1
BATTLE_WORKER_POSTGRES_POOL_MAX=1
TOURNAMENT_WORKER_POSTGRES_POOL_MAX=1
GATEWAY_API_POSTGRES_POOL_MAX=4
GATEWAY_ORCHESTRATOR_POSTGRES_POOL_MAX=2
RELEASE_CONTROLLER_POSTGRES_POOL_MAX=2
PROFILE_SEED_POSTGRES_POOL_MAX=1

# Redis
REDIS_HOST=127.0.0.1
REDIS_PORT=16379
REDIS_DB=0
REDIS_PASSWORD=change-me
# REDIS_URL=redis://:change-me@127.0.0.1:16379/0

# Shared secrets
GAME_TOKEN_SECRET=change-me

# Gateway API
GATEWAY_API_HOST=0.0.0.0
GATEWAY_API_PORT=13000
# Internal projection-only API used by profile Game APIs. Defaults to the local Gateway API port.
GATEWAY_INTERNAL_API_URL=http://127.0.0.1:13000
# 실행 중 Game API가 누락된 관리자 아이콘 초기화를 Gateway 원장에서 다시 확인하는 주기입니다(최소 1000ms).
ACCOUNT_ICON_RESET_RECONCILE_INTERVAL_MS=30000
GATEWAY_PUBLIC_URL=http://localhost:13000
GATEWAY_REDIS_PREFIX=sammo:gateway
GATEWAY_DB_SCHEMA=public
GATEWAY_WORKSPACE_ROOT=/path/to/core2026
GATEWAY_WORKTREE_ROOT=/path/to/core2026/.worktrees
GATEWAY_USER_ICON_DIR=uploads/user-icons
GATEWAY_USER_ICON_PUBLIC_URL=https://sam-image.hided.net/icons
GATEWAY_IMAGE_UPLOAD_URL=https://sam-image.hided.net
GATEWAY_IMAGE_UPLOAD_SECRET_FILE=/run/secrets/image_upload_core2026_secret
GATEWAY_SHARED_ICON_PUBLIC_URL=https://sam-image.hided.net/icons
GAME_IMAGE_UPLOAD_URL=https://sam-image.hided.net
GAME_IMAGE_UPLOAD_SECRET_FILE=/run/secrets/image_upload_core2026_secret
GAME_CONTENT_IMAGE_PUBLIC_URL=https://sam-image.hided.net/uploads/core2026
IMAGE_SYNC_URL=https://sam-image.hided.net
IMAGE_SYNC_SECRET_FILE=/run/secrets/image_sync_core2026_secret
GATEWAY_LOCAL_REGISTRATION_ENABLED=true
GATEWAY_LOCAL_ACCOUNT_GRACE_DAYS=7
# Optional. Keep the PEM private key outside Git; if omitted, a per-process RSA key is generated.
# GATEWAY_PASSWORD_ENCRYPTION_PRIVATE_KEY_FILE=/run/secrets/gateway_password_private_key
# Required only while imported ref SHA-512 credentials remain.
# GATEWAY_LEGACY_PASSWORD_GLOBAL_SALT=replace-with-ref-global-salt
SESSION_TTL_SECONDS=604800
GAME_SESSION_TTL_SECONDS=21600
OAUTH_SESSION_TTL_SECONDS=600
KAKAO_REST_KEY=your-kakao-rest-key
KAKAO_ADMIN_KEY=your-kakao-admin-key
KAKAO_REDIRECT_URI=http://localhost:13000/oauth/kakao/callback

# Game API
GAME_API_HOST=0.0.0.0
GAME_API_PORT=14000
PROFILE=hwe
SCENARIO=default
DAEMON_REQUEST_TIMEOUT_MS=5000
# realtime은 벽시계 경과를 game tick으로 투영합니다. manual은 daemon이
# 다음 월 snapshot을 대기 없이 실행하며 테스트/장기 시뮬레이션에 사용합니다.
GAME_CLOCK_MODE=realtime
TRPC_PATH=/trpc

# Frontend public URLs
# These values are public and become part of the browser bundle.
VITE_GATEWAY_WEB_URL=/gateway/
VITE_IMAGE_PUBLIC_URL=https://sam-image.hided.net
# Comma-separated public hostnames accepted by Vite preview. Use * only behind a trusted reverse proxy.
VITE_PREVIEW_ALLOWED_HOSTS=localhost,dev-sam-e2e.hided.net
# Account-uploaded icons are public immutable files on the image service.
VITE_GATEWAY_USER_ICON_BASE_URL=https://sam-image.hided.net/icons
VITE_BOARD_COMMUNITY_URL=/xe/community
# Set the remaining links only after their public routes are confirmed.
VITE_BOARD_REQUEST_URL=
VITE_BOARD_TIP_URL=
VITE_BOARD_PATCH_URL=
VITE_OFFICIAL_CHAT_URL=
VITE_CASUAL_CHAT_URL=
