mirror of
https://github.com/patdelphi/suanming.git
synced 2026-02-28 05:33:11 +08:00
fix: Improve database persistence in Koyeb deployment
- Remove forced database initialization from Dockerfile CMD - App now auto-initializes database on startup without data loss - Skip sample data creation in production environment - Ensure admin user exists in production without recreating - Fixes database reset issue on every Koyeb deployment - Maintains data persistence with proper volume mounting
This commit is contained in:
@@ -29,5 +29,5 @@ ENV PORT=8000
|
||||
# 暴露端口
|
||||
EXPOSE 8000
|
||||
|
||||
# 初始化数据库并启动应用
|
||||
CMD ["sh", "-c", "node server/scripts/initDatabase.cjs && node server/index.cjs"]
|
||||
# 启动应用(数据库初始化在应用启动时自动进行)
|
||||
CMD ["node", "server/index.cjs"]
|
||||
Reference in New Issue
Block a user