From 7327a69b55a20b99b14ee0803d6cf5f8b88c45ef Mon Sep 17 00:00:00 2001 From: Factiven Date: Wed, 13 Sep 2023 00:45:53 +0700 Subject: Update v4 - Merge pre-push to main (#71) * Create build-test.yml * initial v4 commit * update: github workflow * update: push on branch * Update .github/ISSUE_TEMPLATE/bug_report.md * configuring next.config.js file --- Dockerfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index d4f7d9c..8b12d67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -- cgit v1.2.3