This commit is contained in:
parent
aa503373b8
commit
0620f672db
12
Dockerfile
12
Dockerfile
@ -12,11 +12,11 @@ FROM base AS builder
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
# Add the commit hash
|
# Add the commit hash
|
||||||
ARG GIT_REV
|
ARG GIT_REV
|
||||||
ENV GIT_REV ${GIT_REV}
|
ENV GIT_REV=${GIT_REV}
|
||||||
|
|
||||||
# Build the app
|
# Build the app
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
@ -25,8 +25,8 @@ RUN pnpm run build
|
|||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV=production
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
RUN addgroup --system --gid 1001 nodejs
|
||||||
RUN adduser --system --uid 1001 nextjs
|
RUN adduser --system --uid 1001 nextjs
|
||||||
@ -42,6 +42,6 @@ COPY --from=builder --chown=nextjs:nodejs /app/next.config.mjs ./next.config.mjs
|
|||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
ENV HOSTNAME "0.0.0.0"
|
ENV HOSTNAME="0.0.0.0"
|
||||||
ENV PORT 80
|
ENV PORT=80
|
||||||
CMD ["pnpm", "start"]
|
CMD ["pnpm", "start"]
|
Reference in New Issue
Block a user