From c743745889a57a9c9bca437aa05778730fe420ef Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 20 Oct 2023 12:04:29 +0100 Subject: [PATCH] im so smart - fix building --- Dockerfile | 7 ++++--- next.config.js | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index b628af3..d020136 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,10 @@ WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . ENV NEXT_TELEMETRY_DISABLED 1 + +ARG GIT_REV +ENV GIT_REV ${GIT_REV} + RUN npm run build # Run the app @@ -34,9 +38,6 @@ COPY --from=builder --chown=nextjs:nodejs /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/package.json ./package.json COPY --from=builder --chown=nextjs:nodejs /app/next.config.js ./next.config.js -ARG GIT_REV -ENV GIT_REV ${GIT_REV} - USER nextjs EXPOSE 80 ENV HOSTNAME "0.0.0.0" diff --git a/next.config.js b/next.config.js index 3522826..7282342 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,5 @@ const nextBuildId = require("next-build-id"); -console.log("Building with build id: " + process.env.GIT_REV); - /** @type {import('next').NextConfig} */ const nextConfig = { generateEtags: true,