Commit graph

2 commits

Author SHA1 Message Date
Vadym Samoilenko
dc1b1efbab fix: use minimal Payload config in migrator to prevent OOM SIGKILL
The migrator was importing the full payload.config.ts which loads lexical
editor + form-builder plugin — very heavy modules that caused the process
to be SIGKILL'd (exit 9) on the VPS.

The new migrate.ts builds an inline minimal config: only the postgres
adapter + explicit migrationDir. No editor, no plugins, no
collections/globals needed to run raw SQL migrations. This should fit
comfortably within VPS memory limits.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 21:46:29 +00:00
Vadym Samoilenko
1ba1349607 fix: use programmatic migrate script instead of pnpm payload migrate
pnpm payload migrate exits 1 in the migrator container likely due to TLA
issues with Lexical packages (same issue seen with migrate:create).

Replace with a small src/scripts/migrate.ts that calls payload.db.migrate()
programmatically, using the same NODE_OPTIONS approach that works for seed.ts:
  NODE_OPTIONS="--experimental-strip-types --no-require-module"

Also add migrator log output to the CD workflow for easier debugging.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 21:37:29 +00:00