Fix AFFiNE init container migration command for v0.26.0

The stable image removed scripts/self-host-predeploy.js. Use the new
predeploy flow: prisma migrate + dist/main.js run.

[ci skip]
This commit is contained in:
Viktor Barzin 2026-02-07 10:33:43 +00:00
parent af38a71183
commit 877650034e
No known key found for this signature in database
GPG key ID: 0EB088298288D958

View file

@ -93,7 +93,7 @@ resource "kubernetes_deployment" "affine" {
init_container {
name = "migration"
image = "ghcr.io/toeverything/affine:stable"
command = ["sh", "-c", "node ./scripts/self-host-predeploy.js"]
command = ["sh", "-c", "npx prisma migrate deploy && SERVER_FLAVOR=script node ./dist/main.js run"]
dynamic "env" {
for_each = local.common_env