aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-09-13 00:45:53 +0700
committerGitHub <[email protected]>2023-09-13 00:45:53 +0700
commit7327a69b55a20b99b14ee0803d6cf5f8b88c45ef (patch)
treecbcca777593a8cc4b0282e7d85a6fc51ba517e25 /Dockerfile
parentUpdate issue templates (diff)
downloadmoopa-7327a69b55a20b99b14ee0803d6cf5f8b88c45ef.tar.xz
moopa-7327a69b55a20b99b14ee0803d6cf5f8b88c45ef.zip
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
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile16
1 files changed, 10 insertions, 6 deletions
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