Skip to content

console prod image: effectdb migrate up crashes at boot (bun: not found) — blocks demo redeploy #326

Description

@returnsvoidjanet

What happens

After merging #325 (demo deploy path) and cutting console-demo over to the unified ghcr.io/petalnet/console:main image, the console container crash-loops (exit 127):

./node_modules/.bin/effectdb: 41: exec: bun: not found

apps/console/docker-entrypoint.sh runs ./node_modules/.bin/effectdb migrate up before exec node build. effectdb's bin shim execs bun, which is not installed in the runtime image (Dockerfile builds and runs on node only).

Why it surfaced now

#325 moved effectdb from devDeps to prod deps (per review), so it is now present in the pruned prod image — and its migrate CLI needs bun at runtime. Before, effectdb was absent from the prod image entirely.

Current state

  • console-demo rolled back to the working split stack (web/api/bridge/postgres) — demo is UP, no outage.
  • The unified image builds + pushes fine (console-release green on 68ba25a); only the runtime migrate step fails.
  • No DB changes occurred — migrate failed at exec bun before any migration ran, DB volume untouched.

Fix options (effectdb packaging — Eli's call)

  1. Install bun in the runtime image (Dockerfile final stage).
  2. Invoke migrations via node instead of the bun shim, if effectdb supports it.
  3. Run migrations as a build-time / separate one-shot job, not in the runtime entrypoint.
  4. Precompile/bundle the migrator so no bun is needed at runtime.

Blocks the console-demo redeploy (the "redeploy" step after #325). Everything up to and including the merge is done and verified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions