Updated docker file.

This commit is contained in:
Mike Cao 2022-06-14 11:32:21 -07:00
parent f2aa358792
commit 6ff4ce2ad6

View File

@ -8,18 +8,16 @@ RUN yarn install --frozen-lockfile
# Rebuild the source code only when needed
FROM node:16-alpine AS builder
ARG BASE_PATH
ARG DATABASE_TYPE
ENV BASE_PATH=$BASE_PATH
ENV DATABASE_URL "postgresql://umami:umami@db:5432/umami"
ENV DATABASE_TYPE=$DATABASE_TYPE
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
ARG BASE_PATH
ARG DATABASE_URL
ARG DATABASE_TYPE
ENV BASE_PATH $BASE_PATH
ENV DATABASE_URL $DATABASE_URL
ENV DATABASE_TYPE $DATABASE_TYPE
ENV NEXT_TELEMETRY_DISABLED 1
RUN yarn build
@ -29,7 +27,6 @@ FROM node:16-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs