add dockerfile
This commit is contained in:
parent
711993220b
commit
70866e7f5b
10
Dockerfile
10
Dockerfile
@ -1,10 +1,16 @@
|
||||
FROM node:current-alpine AS build
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY ./prisma ./prisma
|
||||
RUN npx prisma generate
|
||||
|
||||
COPY ./next.config.ts ./tsconfig.json ./eslint.config.mjs ./
|
||||
COPY ./src ./src
|
||||
|
||||
RUN npm run build
|
||||
RUN cp -r .next/static .next/standalone/.next/
|
||||
|
||||
@ -12,4 +18,4 @@ FROM node:current-alpine AS production
|
||||
COPY --from=build /app/.next/standalone /app
|
||||
EXPOSE 3000
|
||||
WORKDIR /app
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["node", "server.js"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user