# 巡樓 Prod 環境（deploy/docker-compose.yml 讀這份）
# 不要手動編輯！請執行以下指令自動產生：
#   make setup-env
# 或直接執行：
#   bash deploy/setup.sh

# --- infra compose（Mongo / Redis 容器，與下方 HAIXUN_MONGO_URI / HAIXUN_REDIS_PASSWORD 密碼必須一致）---
MONGO_PORT=27017
MONGO_ROOT_USER=haixun
MONGO_ROOT_PASSWORD=CHANGE_ME
MONGO_DATABASE=haixun

REDIS_PORT=6379
REDIS_PASSWORD=CHANGE_ME

# --- app compose ---
WEB_IMAGE=ghcr.io/kupi-cat/haixun-web
WEB_TAG=v0.0.1
BACKEND_IMAGE=ghcr.io/kupi-cat/haixun-backend
BACKEND_TAG=v0.0.1
NODE_WORKER_IMAGE=ghcr.io/kupi-cat/haixun-node-worker
NODE_WORKER_TAG=v0.0.1

WEB_PORT=80

# ⚠ 以下由 setup.sh 自動填入，手動改很容易忘記 URL-encode
HAIXUN_MONGO_URI=mongodb://haixun:CHANGE_ME@mongo:27017/?authSource=admin
HAIXUN_MONGO_DB=haixun
HAIXUN_REDIS_ADDR=redis:6379
HAIXUN_REDIS_PASSWORD=CHANGE_ME

# openssl rand -base64 48
HAIXUN_JWT_ACCESS_SECRET=CHANGE_ME
HAIXUN_JWT_REFRESH_SECRET=CHANGE_ME
HAIXUN_WORKER_SECRET=CHANGE_ME
# openssl rand -base64 32
HAIXUN_SECRETS_KEY=CHANGE_ME

THREADS_APP_ID=
THREADS_APP_SECRET=
THREADS_REDIRECT_URI=http://your-domain.example/api/v1/threads-accounts/oauth/callback
THREADS_OAUTH_SUCCESS_REDIRECT=http://your-domain.example

INIT_TENANT_ID=default
INIT_ADMIN_EMAIL=admin@example.com
INIT_ADMIN_PASSWORD=CHANGE_ME_AT_LEAST_8_CHARS
INIT_ADMIN_DISPLAY_NAME=Admin

HAIXUN_WORKER_POLL_MS=3000
HAIXUN_8D_TARGET_SAMPLES=4

# --- Worker / sweeper 行為（預設值，改完 make prod-rebuild 生效）---
HAIXUN_JOB_SCHEDULER_ENABLED=false
HAIXUN_JOB_SCHEDULER_INTERVAL_SECONDS=60
HAIXUN_JOB_REAPER_ENABLED=false
HAIXUN_JOB_REAPER_INTERVAL_SECONDS=30
HAIXUN_THREADS_TOKEN_REFRESH_ENABLED=false
HAIXUN_THREADS_TOKEN_REFRESH_INTERVAL_SECONDS=3600
HAIXUN_THREADS_TOKEN_REFRESH_LEAD_DAYS=7
HAIXUN_THREADS_PUBLISH_QUEUE_ENABLED=false
HAIXUN_THREADS_PUBLISH_QUEUE_INTERVAL_SECONDS=60
HAIXUN_THREADS_PUBLISH_QUEUE_BATCH_SIZE=20