Set busy_timeout before journal_mode=WAL in db.ts so SQLite retries for 10s instead of failing immediately with the default 0ms timeout. Extract migration into a dedicated Docker Compose service so both jetstream and api wait for it to complete before opening the database.