|
|
@ -1,7 +1,7 @@
|
|
|
|
FROM node:lts-alpine AS deps
|
|
|
|
FROM node:lts-alpine AS deps
|
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json yarn.lock prisma ./
|
|
|
|
COPY package.json yarn.lock ./
|
|
|
|
RUN yarn install --frozen-lockfile
|
|
|
|
RUN yarn install --frozen-lockfile
|
|
|
|
|
|
|
|
|
|
|
|
FROM node:lts-alpine AS builder
|
|
|
|
FROM node:lts-alpine AS builder
|
|
|
@ -9,7 +9,6 @@ WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
COPY . .
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED 1;
|
|
|
|
ENV NEXT_TELEMETRY_DISABLED 1;
|
|
|
|
RUN yarn run prisma:generate
|
|
|
|
|
|
|
|
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
|
|
|
|
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
|
|
|
|
|
|
|
|
|
|
|
|
FROM node:lts-alpine AS runner
|
|
|
|
FROM node:lts-alpine AS runner
|
|
|
@ -27,7 +26,6 @@ COPY --from=builder /app/public ./public
|
|
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
|
|
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
|
|
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
|
|
COPY --from=builder /app/package.json ./package.json
|
|
|
|
COPY --from=builder /app/package.json ./package.json
|
|
|
|
COPY --from=builder /app/prisma ./prisma
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
USER nextjs
|
|
|
|
USER nextjs
|
|
|
|
|
|
|
|
|
|
|
|