haixunMaster/haixun-backend/deploy/.env.example

40 lines
1.5 KiB
Plaintext
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.

# 複製為 deploy/.env 後再啟動:cp deploy/.env.example deploy/.env
# ── 對外埠 ──
HAIXUN_WEB_PORT=8080
# ── 前端打包模式 ──
# static = 本機 make web-build 後 nginx 只 COPY dist(預設,最快)
# docker = 在 Docker 內跑 npm build(需改 compose 用 Dockerfile.web)
# HAIXUN_WEB_BUILD_MODE=static
# ── Worker 分身數(make prod 會帶入 docker compose --scale)──
GO_WORKER_REPLICAS=1
NODE_STYLE8D_WORKER_REPLICAS=1
# ── Mongo / Redis(容器內預設,通常不用改)──
# 資料存在 Docker named volume:haixun-prod_mongo_data、haixun-prod_redis_data
# prod-down 不會刪 volume;重啟 container 資料仍在。
# 只改版程式:make prod-update(不碰 mongo/redis)
HAIXUN_MONGO_URI=mongodb://mongo:27017
HAIXUN_MONGO_DATABASE=haixun
HAIXUN_REDIS_ADDR=redis:6379
# ── 安全金鑰(正式環境務必更換)──
HAIXUN_AUTH_ACCESS_SECRET=change-me-access-secret
HAIXUN_AUTH_REFRESH_SECRET=change-me-refresh-secret
HAIXUN_WORKER_SECRET=change-me-worker-secret
# ── 首次初始化管理員(make prod 會自動跑 init;已存在則跳過建立)──
INIT_TENANT_ID=default
INIT_ADMIN_EMAIL=admin@haixun.local
INIT_ADMIN_PASSWORD=Admin-Pass-1!
# ── Node 8D worker 選項 ──
# HAIXUN_NODE_WORKER_ID=custom-node-worker-1
# HAIXUN_WORKER_POLL_MS=3000
# ── 略過自動 init ──
# 預設:若 Mongo 已有 members 會自動跳過 init。
# 強制重跑 init:PROD_FORCE_INIT=1 make prod
# HAIXUN_SKIP_INIT=1