Commitdcefebeunknown_key
fix(docker): copy scripts/ into image for runtime imports
fix(docker): copy scripts/ into image for runtime imports
Tonight's `fly deploy` succeeded the migrate step but every machine
crashed at startup with:
error: Cannot find module '../../scripts/self-host-bootstrap'
from '/app/src/lib/self-bootstrap.ts'
Root cause: the Dockerfile only copied `src/`, `drizzle/`, etc —
not `scripts/`. The new `src/lib/self-bootstrap.ts` imports
`runBootstrap` from `scripts/self-host-bootstrap.ts`, which
exists in dev but not in the production image.
Two ways to fix:
1. Move runBootstrap into src/ — invasive refactor of working code
2. Copy scripts/ into the image — one line, no code changes
Going with (2). The scripts directory is small (~225 KB), all
files are operator tooling that's safe to ship, and several other
things in src/ already reach into scripts/ at runtime (e.g. the
admin-self-host route spawns scripts/self-host-bootstrap.ts
directly). The image was already inconsistent on this point;
this commit closes the gap.
https://claude.ai/code/session_01QFLWDxWw65DX6enMcS5Lwe1 file changed+1−0dcefebe346be574a12b4b2332a54f5c6019c44b8
1 changed file+1−0