initial booking
This commit is contained in:
16
docker/entrypoint.sh
Normal file
16
docker/entrypoint.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Sync schema to the mounted SQLite volume. `db push` is fine for a single-tenant
|
||||
# MVP where we don't need an audit trail of migrations. Switch to `migrate deploy`
|
||||
# once the schema stabilizes and we want versioned migrations.
|
||||
echo "→ Running prisma db push"
|
||||
npx prisma db push --skip-generate --accept-data-loss=false
|
||||
|
||||
# Optionally seed when explicitly requested. Idempotent (upsert).
|
||||
if [ "${RUN_SEED:-false}" = "true" ]; then
|
||||
echo "→ Running seed"
|
||||
node --import tsx ./prisma/seed.ts || true
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user