diff options
| author | Factiven <[email protected]> | 2023-09-12 21:45:30 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-09-12 21:45:30 +0700 |
| commit | 701798acaeb28f657bd1420d06253d350eb41b96 (patch) | |
| tree | 6df53eb6c7ae07c5af21bcd6d3a0078b1d196d13 /Dockerfile | |
| parent | Create build-test.yml (diff) | |
| download | moopa-701798acaeb28f657bd1420d06253d350eb41b96.tar.xz moopa-701798acaeb28f657bd1420d06253d350eb41b96.zip | |
initial v4 commit
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -17,11 +17,15 @@ RUN npm run build FROM base AS runner ENV NEXT_TELEMETRY_DISABLED 1 WORKDIR /app -RUN addgroup --system --gid 1001 nodejs; \ - adduser --system --uid 1001 nextjs COPY --from=builder /app/public ./public -COPY --from=builder --chown=1001:1001 /app/.next/standalone ./ -COPY --from=builder --chown=1001:1001 /app/.next/static ./.next/static -USER nextjs +COPY --from=builder /app/.next/standalone ./ +COPY --from=builder /app/.next/static ./.next/static + +# DB Initialization: Experimental +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 + +# USER nextjs EXPOSE 3000 -CMD ["node", "server.js"] +CMD npx prisma migrate deploy; npx prisma generate; node server.js
\ No newline at end of file |