thread-master/apps/backend/etc/gateway.yaml

109 lines
3.1 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.

# 巡樓 gateway — 唯一主設定檔A-02
# Secret 請用環境變數覆寫。
Name: haixun-gateway
Host: 0.0.0.0
Port: 8888
Timeout: 30000
MaxBytes: 104857600
Log:
Mode: console
Level: info
# go-zero monc 快取Redis— 與 monc.MustNewModel / CacheRedis 對接
# 若 Redis 有 requirepass設 Pass 或環境變數 REDIS_PASSWORD / HAIXUN_REDIS_PASSWORD
# (沒帶密碼會 NOAUTH登入 API 回 500
CacheRedis:
- Host: 127.0.0.1:6379
Type: node
Pass: ""
# Mongo — mon/monc 使用完整 URI含帳密時寫在 URI可用環境變數 MONGO_URI 覆寫)
# 本機有 auth 的例子:
# export MONGO_URI='mongodb://USER:PASS@127.0.0.1:27017/?authSource=admin'
# 沒設帳密但 Mongo 開了 auth → 查詢會失敗,登入會 500 而不是「密碼錯」
Mongo:
URI: "mongodb://127.0.0.1:27017"
Database: "haixun"
Auth:
AccessSecret: "change-me-access-secret"
AccessExpire: 86400
RefreshSecret: "change-me-refresh-secret"
RefreshExpire: 604800
Platform:
AIKey: ""
ExaKey: ""
ThreadsAppId: ""
ThreadsAppSecret: ""
Worker:
ID: "worker-local-1"
PollIntervalMs: 2000
Bcrypt:
Cost: 10
# OAuth空則 callback 走 mock / 開發路徑)
OAuth:
GoogleClientID: ""
LineClientID: ""
LineClientSecret: ""
LineRedirectURI: ""
# 驗證碼/重設密碼寄信
#
# 本機MailpitMailgun 相容 SMTP 介面):
# Host: 127.0.0.1 Port: 1025 User/Password 可空
# UI: http://127.0.0.1:8025
# 容器old/infra docker-compose 的 mailpit 服務
#
# 正式 Mailgun SMTP 例:
# Host: smtp.mailgun.org Port: 587
# User: postmaster@YOUR_DOMAIN Password: <API SMTP password>
# DevExposeCode: false
#
# env 覆寫MAIL_SMTP_* 或 HAIXUN_SMTP_*(舊名相容)
Mail:
Sender: "Harbor Desk <noreply@haixun.local>"
SMTP:
Host: "127.0.0.1"
Port: 1025
User: ""
Password: ""
# 不再於 API 回傳驗證碼碼只在郵件MailpitSMTP
DevExposeCode: false
# 前端 origin重設信連結 + 預設 logo URL/brand-mark.jpg
# 遠端 devhttps://threads-tool-dev.30cm.net
PublicWebBase: "http://127.0.0.1:5173"
# 郵件品牌hermes 模板LogoURL 空 = PublicWebBase/brand-mark.jpg
Brand:
Name: "Harbor Desk"
LogoURL: ""
Copyright: "© Harbor Desk"
# 物件儲存(頭像等)— **只接 MinIO/S3**
#
# Endpoint = gateway 上傳用(本機 MinIO一定要 :9000
# PublicBaseURL = 瀏覽器讀圖用(走 nginx :80不要寫 port、不要加 /bucket
# 成品網址 = PublicBaseURL + "/" + key
# 例http://10.0.0.5/haixun-assets/avatar/1000000/xxx.png
#
# Secret 建議用 env不要 commit
# export HAIXUN_STORAGE_S3_ACCESS_KEY=haixun
# export HAIXUN_STORAGE_S3_SECRET_KEY='你的密碼'
# 或 MINIO_ROOT_USER / MINIO_ROOT_PASSWORDApplyEnv 會讀)
ObjectStorage:
Endpoint: "http://127.0.0.1:9000"
Region: "us-east-1"
Bucket: "haixun-assets"
AccessKey: "haixun"
SecretKey: ""
UsePathStyle: true
# env HAIXUN_STORAGE_S3_PUBLIC_BASE_URL 會覆寫;勿用 /api/v1/public/assets新後端無此 route
PublicBaseURL: "https://threads-tool-dev.30cm.net/haixun-assets"