#!/bin/sh # Startup for the Hugging Face Docker Space. # Storage is ephemeral, so apply migrations + seed on every boot (both are # idempotent), then start Next.js bound to the Space's public port. set -e echo "→ Applying database migrations…" npx prisma migrate deploy echo "→ Seeding database (idempotent)…" npx prisma db seed echo "→ Starting RotNot on 0.0.0.0:7860…" exec npm run start -- -p 7860 -H 0.0.0.0