1 Commits

Author SHA1 Message Date
38b18b7881 fix: bootstrap prisma data before app start 2026-05-31 00:56:12 +00:00
3 changed files with 3 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ The deployment model is expected to follow the shared dev, QA, and production br
- `NEXT_PUBLIC_SITE_URL` should match the deployed environment. - `NEXT_PUBLIC_SITE_URL` should match the deployed environment.
- `DATABASE_URL` should target the environment-specific PostgreSQL instance. - `DATABASE_URL` should target the environment-specific PostgreSQL instance.
- Stripe and email provider secrets live in environment variables. - Stripe and email provider secrets live in environment variables.
- The production container applies Prisma migrations and seeds the property inventory before the Next.js server starts so checkout has the required `Property` records.
## Port Mapping ## Port Mapping

View File

@@ -17,4 +17,4 @@ RUN npm run build
EXPOSE 3000 EXPOSE 3000
CMD ["node", ".next/standalone/server.js"] CMD ["sh", "-c", "npm run prisma:migrate:deploy && npm run prisma:seed && node .next/standalone/server.js"]

View File

@@ -10,6 +10,7 @@
"test": "vitest run", "test": "vitest run",
"test:e2e": "playwright test", "test:e2e": "playwright test",
"prisma:generate": "prisma generate", "prisma:generate": "prisma generate",
"prisma:migrate:deploy": "prisma migrate deploy",
"prisma:migrate:dev": "prisma migrate dev", "prisma:migrate:dev": "prisma migrate dev",
"prisma:seed": "tsx prisma/seed.ts" "prisma:seed": "tsx prisma/seed.ts"
}, },