refactor: 数据库持久化改用宿主机目录挂载

- Prisma DATABASE_URL 改为环境变量注入
- 数据挂载从 Docker Volume 改为 /data/no-whatever/
- 本地开发通过 .env 文件配置数据库路径
This commit is contained in:
2026-02-25 12:24:44 +08:00
parent 54ccb9fb40
commit 7bc18ce503
4 changed files with 8 additions and 8 deletions
+2 -5
View File
@@ -6,10 +6,7 @@ services:
ports:
- "3000:3000"
volumes:
- app-data:/app/data
- /data/no-whatever:/app/data
environment:
- DATABASE_URL=file:/app/data/dev.db
- DATABASE_URL=file:/app/data/prod.db
restart: unless-stopped
volumes:
app-data: