From 711993220bf1bca1de4f13386b8eb38c6e33dcf6 Mon Sep 17 00:00:00 2001 From: Nareshkumar Rao Date: Wed, 2 Apr 2025 02:07:29 +0200 Subject: [PATCH] add dockerfile --- .dockerignore | 4 ++++ Dockerfile | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b465baa --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.next/ +node_modules/ +.env* +next-env.d.ts diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..11f3b3d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:current-alpine AS build + +COPY . /app +WORKDIR /app + +RUN npm install +RUN npx prisma generate +RUN npm run build +RUN cp -r .next/static .next/standalone/.next/ + +FROM node:current-alpine AS production +COPY --from=build /app/.next/standalone /app +EXPOSE 3000 +WORKDIR /app +CMD ["node", "server.js"] \ No newline at end of file