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 24469f4590
commit c4e4aa25d0

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