Closed DesnLee closed 1 year ago
环境变量名应该是 DATABASE 不是 DATABASE_URL。这是个历史遗留问题会处理成 Prisma的环境变量 DATABASE_URL 改成 DATABASE 也不行吗
环境变量名应该是 DATABASE 不是 DATABASE_URL。这是个历史遗留问题会处理成 Prisma的环境变量 DATABASE_URL 改成 DATABASE 也不行吗
使用 DATABASE,admin 面板 management 会报 500 the URL must start with the protocol 'file:'
, 我看 prisma schema 里面的 db provider 是写死的 sqlite,url 就必须以 file:
开头了
我在 prestart 和 postinstall 里做了个 init 脚本去修改了这个 db provider。直接 status-server-run
不会触发这个钩子。
定义 dotenv 文件之后再 npm i nodestatus-server@latest --unsafe-perm -g
应该会执行 init 脚本,应该是个暂时的解决办法
我在 prestart 和 postinstall 里做了个 init 脚本去修改了这个 db provider。直接
status-server-run
不会触发这个钩子。定义 dotenv 文件之后再
npm i nodestatus-server@latest --unsafe-perm -g
应该会执行 init 脚本,应该是个暂时的解决办法
可以了。之前是先跑起来才创建的 dotenv,重新装了一下,把 sqlite 数据迁移了一下,ok了。
最新版应该修复这个问题了
最新版应该修复这个问题了
ok ,我已经用上面的方法迁移完了。选择这样是因为docker好像没提供arm镜像
有两个问题: