13 lines
400 B
Bash
13 lines
400 B
Bash
#!/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..."
|
|
npx prisma db push --accept-data-loss --skip-generate
|
|
|
|
echo "[Entrypoint] Starting Next.js application..."
|
|
exec node server.js
|