run prisma migrations in the container

This commit is contained in:
Joey Eamigh 2026-02-11 23:06:50 -05:00
parent dd75b2fdce
commit 3ea16c4901
No known key found for this signature in database
GPG Key ID: CE8C05DFFC53C9CB

View File

@ -20,6 +20,10 @@ ENV PORT=3000
COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/prisma.config.ts ./prisma.config.ts
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
RUN npm install --no-save prisma@7.3.0 dotenv@17
EXPOSE 3000 EXPOSE 3000
CMD ["node", "server.js"] CMD npx prisma migrate deploy && node server.js