Use entrypoint.sh to run prisma db push before starting server
This commit is contained in:
@@ -43,11 +43,17 @@ COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
|
|||||||
COPY --from=builder /app/node_modules/@prisma ./node_modules/@prisma
|
COPY --from=builder /app/node_modules/@prisma ./node_modules/@prisma
|
||||||
COPY --from=builder /app/prisma ./prisma
|
COPY --from=builder /app/prisma ./prisma
|
||||||
|
|
||||||
|
# Copy and set up entrypoint
|
||||||
|
COPY --chown=nextjs:nodejs entrypoint.sh ./entrypoint.sh
|
||||||
|
|
||||||
|
USER root
|
||||||
|
RUN chmod +x ./entrypoint.sh
|
||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
ENV PORT=3000
|
ENV PORT=3000
|
||||||
ENV HOSTNAME="0.0.0.0"
|
ENV HOSTNAME="0.0.0.0"
|
||||||
|
|
||||||
CMD ["node", "server.js"]
|
ENTRYPOINT ["./entrypoint.sh"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user