Skip to content

World's first open-source enterprise world model.

Container deploys stop eating the files they were given (#24)

WaylandYang8637e2d8c061
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 00000000..b54ab399
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,13 @@
+# 构建上下文只需要源码。target/ 与 node_modules/ 不排除的话,
+# 光是把上下文发给 daemon 就要几分钟;node_modules 还会覆盖容器内
+# pnpm install 出来的那份(宿主机若是 Windows/macOS,二进制不兼容)。
+target/
+**/node_modules/
+.git/
+.github/
+data/
+web/dist/
+docs/
+.claude/
+.env
+*.log
diff --git a/docker-compose.yml b/docker-compose.yml
index 8b0d0b81..d3a9ef63 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -28,6 +28,12 @@ services:
UTOPIA_BIND_ADDR: 0.0.0.0:8080
UTOPIA_JWT_SECRET: ${UTOPIA_JWT_SECRET:-please-change-me-in-production}
UTOPIA_WEB_DIST: /app/web-dist
+ UTOPIA_DATA_DIR: /app/data
+ volumes:
+ # 原始文件(files/)与全文索引(index/)。不挂出来的话,容器一重建
+ # 它们就没了,而库里的 documents 记录还在——引用全断且不报错。
+ # 备份 = 这个目录 + 数据库。
+ - ./data:/app/data
ports:
- "8080:8080"
depends_on: