start.sh 434 B

1234567891011
  1. #!/bin/sh
  2. set -e
  3. # Apply pending drizzle migrations before booting the api. If migration fails
  4. # the container crashes and Dokploy will keep the previous deploy alive — see
  5. # CLAUDE.md §5.5 (every deploy reversible).
  6. echo "{\"event\":\"migrate_start\",\"ts\":\"$(date -Iseconds)\"}"
  7. sh /app/apps/api/node_modules/.bin/drizzle-kit migrate
  8. echo "{\"event\":\"migrate_done\",\"ts\":\"$(date -Iseconds)\"}"
  9. exec bun run src/index.ts