thread-master/backend/etc/gateway.yaml

63 lines
1.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Name: haixun-backend
Host: 0.0.0.0
Port: 8890
Timeout: 120000
# 本機開發設定。預設搭配 `make dev-infra`infra/docker-compose.yml讀 deploy/.env.dev跑的 Mongo/Redis。
# 帳密對應 deploy/.env.dev 的值;若改 .env.dev 密碼,這裡不需動(${} 會重讀)。
Mongo:
URI: ${HAIXUN_MONGO_URI}
Database: ${HAIXUN_MONGO_DB}
TimeoutSeconds: 10
Redis:
Addr: ${HAIXUN_REDIS_ADDR}
Password: ${HAIXUN_REDIS_PASSWORD}
DB: 0
Auth:
AccessSecret: ${HAIXUN_JWT_ACCESS_SECRET}
RefreshSecret: ${HAIXUN_JWT_REFRESH_SECRET}
AccessExpireSeconds: 900
RefreshExpireSeconds: 2592000
# 僅本機開發開啟:允許用 X-Tenant-ID / X-UID header 模擬登入。正式環境必須為 false。
DevHeaderFallback: true
Secrets:
EncryptionKey: ${HAIXUN_SECRETS_KEY}
InternalWorker:
Secret: ${HAIXUN_WORKER_SECRET}
JobWorker:
Enabled: false
WorkerType: disabled
JobScheduler:
Enabled: true
IntervalSeconds: 60
JobReaper:
Enabled: true
IntervalSeconds: 30
# Meta Threads OAuthApp Dashboard → 用戶端 OAuth 設定須登記 Redirect URI
ThreadsOAuth:
AppID: "${THREADS_APP_ID}"
AppSecret: "${THREADS_APP_SECRET}"
RedirectURI: "${THREADS_REDIRECT_URI}"
# OAuth 完成後瀏覽器導回(現在指向 https://threads-tool.30cm.net
SuccessRedirect: "${THREADS_OAUTH_SUCCESS_REDIRECT}"
# 系統任務:在 token 到期前自動 enqueue refresh-threads-token job
ThreadsTokenRefresh:
Enabled: true
IntervalSeconds: 3600
LeadDays: 7
# 排程發文佇列 sweeper掃描 scheduled_at 到期項目並 PublishText
ThreadsPublishQueue:
Enabled: true
IntervalSeconds: 60
BatchSize: 20