start.sh11 lines · main
1#!/bin/sh
2set -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).
7echo "{\"event\":\"migrate_start\",\"ts\":\"$(date -Iseconds)\"}"
8sh /app/apps/api/node_modules/.bin/drizzle-kit migrate
9
10echo "{\"event\":\"migrate_done\",\"ts\":\"$(date -Iseconds)\"}"
11exec bun run src/index.ts