#!/bin/sh set -e echo "[Entrypoint] Waiting for database..." # Wait for postgres to be ready (optional, but good practice) # We just rely on Docker Compose depends_on with condition: service_healthy, so it should be ready. echo "[Entrypoint] Applying database schema..." node node_modules/prisma/build/index.js db push --accept-data-loss --skip-generate echo "[Entrypoint] Starting Next.js application..." exec node server.js