22 lines
433 B
Docker
22 lines
433 B
Docker
FROM node:current-alpine AS build
|
|
|
|
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/
|
|
|
|
FROM node:current-alpine AS production
|
|
COPY --from=build /app/.next/standalone /app
|
|
EXPOSE 3000
|
|
WORKDIR /app
|
|
CMD ["node", "server.js"]
|