diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -3,6 +3,10 @@ FROM node:16-alpine AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. RUN apk add --no-cache libc6-compat WORKDIR /app + +ARG APP_ENV=production +ENV APP_ENV ${APP_ENV} + COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile @@ -13,6 +17,10 @@ RUN yarn install --frozen-lockfile # Rebuild the source code only when needed FROM node:16-alpine AS builder WORKDIR /app + +ARG APP_ENV=production +ENV APP_ENV ${APP_ENV} + COPY --from=deps /app/node_modules ./node_modules COPY . . @@ -27,6 +35,8 @@ RUN yarn build FROM node:16-alpine AS runner WORKDIR /app +ARG APP_ENV=production +ENV APP_ENV ${APP_ENV} ENV NODE_ENV production # Uncomment the following line in case you want to disable telemetry during runtime. # ENV NEXT_TELEMETRY_DISABLED 1 |
