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