Files
story-edit-web/web/docker-compose.gitsync.yml
邓雨鹏 603f78b77f feat(pointview): 新增「场景/点位」页签——正交俯视真实场景底图 + 点位精确叠加
第三个页签(与海选审核/演出配置平级),只读查看每个点位集里各点的真实
位置/朝向,配 move.to/camera.focus 时对照用,不必回 Unity 翻 json。

- pointview.js: 独立白模点位查看器(按 kind 上色/朝向箭头/悬停坐标/侧栏清单);
  有底图则把正交俯视真实场景图当画布底图、点位按 shot.bounds 线性投上去
  (像素级对齐家具),带显隐开关;无底图回退黑底白模。
- app.py: /api/pointsets 给有底图的点位集附 shot{url,bounds};新增
  /sceneshot/{name}.png 路由(防目录穿越)。
- Dockerfile/compose: 加 STORY_SCENESHOTS_DIR(/sceneshots) env + 挂载点与注释。

底图由 SGame 仓新增 Editor 工具「剧情场景俯视抓拍」产出
({name}.png + {name}.shot.json,map-local 覆盖范围)。
2026-06-14 11:13:45 +08:00

57 lines
3.1 KiB
YAML
Raw Permalink 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.

# 极空间 Composestory 事件编辑器 + 自动 git 同步。
# 效果:本机 push 到 Gitea 后,约 1 分钟内 NAS 自动拉取最新代码——
# 前端刷新浏览器即生效;后端(app.py/db.py/ir_core)由 uvicorn --reload 自动重启生效
# (整仓库挂到 /app + STORY_WEB_RELOAD=1。仅改 requirements.txt/环境变量才需重建镜像。
#
# 用法:极空间 Docker →「Compose / 项目」→ 新建 → 粘贴本文件 → 改下面标 ← 的 2~3 处 → 部署。
# 首次部署前:先停止并删除原来的单容器 story-event-web数据在 /data 目录,删容器不丢)。
services:
# ① 同步器:每 60s 把 Gitea 上的最新仓库强制同步到共享目录 /repo
story-gitsync:
image: alpine/git
container_name: story-gitsync
restart: unless-stopped
entrypoint: ["/bin/sh", "-c"]
command:
- >
git config --global --add safe.directory /repo;
cd /repo;
if [ ! -d .git ]; then
git init -q;
git remote add origin https://git.xindiegaming.top/bia/story-edit-web.git;
fi;
while true; do
git fetch -q origin main && git reset --hard -q origin/main;
sleep 60;
done
volumes:
# ← 共享目录:随便选个空目录给同步器用(不存在会自动建)。下面 story-web 要引用同一路径。
- "/SATA存储11/Docker/story-edit-web-src:/repo"
# ② 编辑器本体(沿用已导入的镜像 story-event-web:latest
story-web:
image: story-event-web:latest
container_name: story-event-web
restart: unless-stopped
depends_on: [story-gitsync]
ports:
- "8787:8787"
environment:
# ← 改成实际口令每人一把口令即身份≥8位且互不相同
# 未配置/口令过短/重复时容器启动即退出(拒绝弱口令裸奔)。
STORY_WEB_USERS: "bia:把我改成口令A,ljl:把我改成口令B"
STORY_WEB_RELOAD: "1" # 配合下面整仓库挂载:后端改动 push 后自动重启生效
TZ: "Asia/Shanghai"
volumes:
# ← 事件数据:填你原来单容器 /data 对应的 NAS 目录(务必填对,否则看不到旧数据)
- "/SATA存储11/Docker/story-event-web/data:/data"
# 整个同步仓库盖在 /app只读web/ 前端+后端、ir_core、ir_dictionary.json 全部
# 来自 git 同步目录;镜像内的 COPY 副本只作无挂载时的兜底。路径按上面共享路径,一般不用改。
- "/SATA存储11/Docker/story-edit-web-src:/app:ro"
# 点位集 + 场景俯视底图(可选):这两个来自 SGame 仓 Assets/StreamingAssets/Story/
# 不在本同步仓里。要让线上「演出配置」有真实坐标、「场景/点位」有底图,把这两目录同步到
# NAS 后取消下面两行注释并改成实际路径(缺失时分别降级为:坐标校验警告 / 白模回退):
# - "/SATA存储11/Docker/story-assets/PointSets:/pointsets:ro"
# - "/SATA存储11/Docker/story-assets/SceneShots:/sceneshots:ro"