#!/bin/sh # Startup sequence for the XIP backend container. # Runs on every (re)start so new migrations land automatically on deploy. set -e cd /app echo "[xip] Applying database migrations (prisma migrate deploy)…" bunx prisma migrate deploy echo "[xip] Seeding catalogue + ads (idempotent upserts)…" bun run prisma/seed.ts || echo "[xip] seed step failed (non-fatal) — continuing" echo "[xip] Starting backend on :${PORT:-3000}…" exec bun run src/index.ts