Copy prisma.config.ts into the runtime image
Prisma 7 reads datasource.url from prisma.config.ts, not schema.prisma. The final Docker stage copied prisma/ but not the root config file, so `prisma migrate deploy` always failed with "datasource.url property is required" regardless of DATABASE_URL being set correctly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,9 @@ COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=build /app/.next/static ./.next/static
|
||||
COPY --from=build /app/public ./public
|
||||
COPY --from=build /app/prisma ./prisma
|
||||
# Prisma 7 reads datasource.url from this file, not schema.prisma — required
|
||||
# for `prisma migrate deploy` at container start.
|
||||
COPY --from=build /app/prisma.config.ts ./prisma.config.ts
|
||||
COPY scripts/cron-runner.mjs ./scripts/cron-runner.mjs
|
||||
RUN mkdir -p /app/.data/uploads && chown -R node:node /app
|
||||
USER node
|
||||
|
||||
Reference in New Issue
Block a user