Bundle Prisma CLI in runtime image
This commit is contained in:
@@ -25,6 +25,10 @@ COPY --from=builder /app/server.js ./server.js
|
|||||||
COPY --from=builder /app/prisma ./prisma
|
COPY --from=builder /app/prisma ./prisma
|
||||||
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/node_modules/.bin/prisma ./node_modules/.bin/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/node_modules/.prisma ./node_modules/.prisma
|
||||||
USER nextjs
|
USER nextjs
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ services:
|
|||||||
PORT: 3000
|
PORT: 3000
|
||||||
ports:
|
ports:
|
||||||
- "${HOST_PORT:-3000}:3000"
|
- "${HOST_PORT:-3000}:3000"
|
||||||
command: sh -c "npx prisma migrate deploy && node server.js"
|
command: sh -c "./node_modules/.bin/prisma migrate deploy && node server.js"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ services:
|
|||||||
PORT: 3000
|
PORT: 3000
|
||||||
ports:
|
ports:
|
||||||
- "${HOST_PORT:-3000}:3000"
|
- "${HOST_PORT:-3000}:3000"
|
||||||
command: sh -c "npx prisma migrate deploy && node server.js"
|
command: sh -c "./node_modules/.bin/prisma migrate deploy && node server.js"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ services:
|
|||||||
PORT: 3000
|
PORT: 3000
|
||||||
ports:
|
ports:
|
||||||
- "${HOST_PORT:-3000}:3000"
|
- "${HOST_PORT:-3000}:3000"
|
||||||
command: sh -c "npx prisma migrate deploy && node server.js"
|
command: sh -c "./node_modules/.bin/prisma migrate deploy && node server.js"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
|
|||||||
Reference in New Issue
Block a user