Files
pixelheros/put/server/.env.example
panFD 5d398d0a29 chore(server): 添加 HOST 配置支持容器部署
在示例环境配置、README 和服务代码中添加 HOST 配置项,默认监听 0.0.0.0 以适配容器和局域网部署场景,同时更新服务启动日志显示正确的监听地址。
2026-10-03 15:37:24 +08:00

25 lines
1.0 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.
# ---- 运行模式 ----
# local = 项目开发版(本地,全功能:写 heroSet.ts / 导出 CSV / push-meta)
# remote = 线上设计版(VPS 部署,仅英雄/预设编辑,版本落后时只读)
MODE=local
# ---- MongoDB(两边都要配置,连同一个库)----
# 本地 MongoDB 示例:mongodb://127.0.0.1:27017
# 带账号密码示例: mongodb://user:password@your-vps-ip:27017
# Atlas 示例: mongodb+srv://user:password@cluster0.xxxx.mongodb.net
MONGO_URL=mongodb://user:password@your-vps-ip:27017
MONGO_DB=heroconfig
# ---- 服务端口 ----
PORT=3001
# 监听地址:默认 0.0.0.0(容器/局域网部署必须);仅本机访问可改 127.0.0.1
HOST=0.0.0.0
# ---- 数据结构版本 ----
# 英雄/底座结构有破坏性变更时 +1,并执行 npm run push-meta 推送到库中
# 线上设计版低于库中版本时将进入只读,需更新部署
SCHEMA_VERSION=1
# ---- 前端(web/.env,仅静态部署时需要;server 托管 dist 时不用配)----
# VITE_API_BASE=http://your-vps-ip:3001