# 本地开发：cp .env.example .env && composer install && php artisan key:generate && php artisan migrate
# 生产部署：bash scripts/deploy.sh（自动切换 .env.production，见 scripts/deploy.sh）
# 生产常驻进程：queue:work、schedule:work、reverb:start（见 README / docs/production-runbook.md）

APP_NAME=Lottery
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost:8000
APP_BIND_HOST=127.0.0.1
VITE_HOST=0.0.0.0

# 本地开发：debug 方便排查；生产用 scripts/deploy.sh 自动切换 .env.production（LOG_LEVEL=warning）
LOG_CHANNEL=daily
LOG_LEVEL=debug
LOG_DAILY_DAYS=14

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=lottery
DB_USERNAME=
DB_PASSWORD=

SESSION_DRIVER=redis
SESSION_DOMAIN=null

BROADCAST_CONNECTION=reverb
REVERB_APP_ID=
REVERB_APP_KEY=
REVERB_APP_SECRET=
REVERB_SERVER_HOST=0.0.0.0
REVERB_HOST=localhost
REVERB_PORT=8080
REVERB_SCHEME=http

QUEUE_CONNECTION=redis
CACHE_STORE=redis
LOTTERY_RISK_POOL_USE_REDIS_LUA=true

# 生产建议独立配置；留空则回落 MAIN_SITE_SSO_JWT_SECRET（勿在生产与 SSO 混用）
# LOTTERY_NATIVE_JWT_SECRET=

# 预发可设为 false，禁止代理账期关账
AGENT_SETTLEMENT_ALLOW_PRODUCTION_CLOSE=true

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
REDIS_DB=0
REDIS_CACHE_DB=1

# 逗号分隔，含协议。本地示例：http://localhost:3800,http://localhost:3801
CORS_ALLOWED_ORIGINS=
CORS_SUPPORTS_CREDENTIALS=false
CORS_MAX_AGE=0

LOTTERY_SETTINGS_CACHE_TTL=60

# 部署参数（后台系统设置只读展示，勿在运营后台修改）
LOTTERY_DEFAULT_CURRENCY=NPR
LOTTERY_DRAW_TIMEZONE=UTC
LOTTERY_DRAW_INTERVAL_MINUTES=5
LOTTERY_DRAW_BETTING_WINDOW_SECONDS=270
LOTTERY_DRAW_CLOSE_BEFORE_SECONDS=30
LOTTERY_DRAW_BUFFER_AHEAD=8
LOTTERY_PLAYER_AUTH_DEV_BYPASS=false
ADMIN_API_TOKEN_TTL_DAYS=7

# 主站对接：生产请在后台「接入站点」(admin_sites) 维护；以下为可选 legacy 兜底，本地联调可填，生产可留空
# MAIN_SITE_BASE_URL=
# MAIN_SITE_SSO_JWT_SECRET=
# MAIN_SITE_WALLET_API_URL=
# MAIN_SITE_WALLET_API_KEY=
# MAIN_SITE_WALLET_TIMEOUT=10

DEV_SEED_WALLET_BALANCE_MINOR=125000
DEV_SEED_WALLET_FROZEN_MINOR=0

SANCTUM_STATEFUL_DOMAINS=
