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
|
FROM node:current-alpine AS build
|
||||||
|
|
||||||
COPY . /app
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
|
COPY ./prisma ./prisma
|
||||||
RUN npx prisma generate
|
RUN npx prisma generate
|
||||||
|
|
||||||
|
COPY ./next.config.ts ./tsconfig.json ./eslint.config.mjs ./
|
||||||
|
COPY ./src ./src
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
RUN cp -r .next/static .next/standalone/.next/
|
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
|
COPY --from=build /app/.next/standalone /app
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user