#!/bin/sh set -e # Apply pending migrations against the database, then start the server. echo "Running prisma migrate deploy…" ./node_modules/.bin/prisma migrate deploy # Ensure the upload directory exists in the mounted volume. mkdir -p "${UPLOAD_DIR:-/data/uploads}" echo "Starting Next.js…" exec node server.js