From d70d166038ad502bcdd6a7bd9b0a30befe6994d7 Mon Sep 17 00:00:00 2001 From: Greg Konush <12027037+gregkonush@users.noreply.github.com> Date: Sat, 31 Aug 2024 19:06:15 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Update=20environment=20variable=20a?= =?UTF-8?q?ssignments=20in=20Dockerfile.=20(#228)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker-build-push.yaml | 1 + apps/ecran/Dockerfile | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-build-push.yaml b/.github/workflows/docker-build-push.yaml index 099f13f..df19a2a 100644 --- a/.github/workflows/docker-build-push.yaml +++ b/.github/workflows/docker-build-push.yaml @@ -50,5 +50,6 @@ jobs: file: ./apps/ecran/Dockerfile tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + push: true cache-from: type=registry,ref=gitea.proompteng.ai/d/lab/ecran:main cache-to: type=inline diff --git a/apps/ecran/Dockerfile b/apps/ecran/Dockerfile index e9bb120..2d1ddb8 100644 --- a/apps/ecran/Dockerfile +++ b/apps/ecran/Dockerfile @@ -10,14 +10,14 @@ FROM base AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -ENV NEXT_TELEMETRY_DISABLED 1 +ENV NEXT_TELEMETRY_DISABLED=1 RUN corepack enable && corepack enable pnpm && pnpm run build # Production image, copy all the files and run next FROM base AS runner WORKDIR /app -ENV NODE_ENV production -ENV NEXT_TELEMETRY_DISABLED 1 +ENV NODE_ENV=production +ENV NEXT_TELEMETRY_DISABLED=1 RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs COPY --from=builder /app/public ./public @@ -32,7 +32,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static USER nextjs EXPOSE 3000 -ENV PORT 3000 +ENV PORT=3000 # server.js is created by next build from the standalone output # https://nextjs.org/docs/pages/api-reference/next-config-js/output