From 6680ccc023d1253df89a74c2220cef044225a200 Mon Sep 17 00:00:00 2001 From: Citali Date: Mon, 2 Feb 2026 00:52:39 +0100 Subject: [PATCH] Fix dev Dockerfile --- Dockerfile.dev | 14 +++++++++++++- Dockerfile.prod | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index d25d639..da2b0c6 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -18,6 +18,12 @@ RUN bunx prisma generate # Uncomment the following line in case you want to disable telemetry during the build. ENV NEXT_TELEMETRY_DISABLED=1 +ARG GIT_SHA=unknown +ARG APP_VERSION=0.0.0 +ARG DEPLOY_ENV=production +ENV NEXT_PUBLIC_GIT_SHA=$GIT_SHA \ + NEXT_PUBLIC_APP_VERSION=$APP_VERSION \ + NEXT_PUBLIC_DEPLOY_ENV=$DEPLOY_ENV # Copy the rest of the code RUN bun run build -d @@ -31,7 +37,13 @@ ENV NEXT_TELEMETRY_DISABLED=1 ENV NODE_ENV=production \ PORT=3000 \ HOSTNAME="0.0.0.0" - +ARG GIT_SHA=unknown +ARG APP_VERSION=0.0.0 +ARG DEPLOY_ENV=production +ENV NEXT_PUBLIC_GIT_SHA=$GIT_SHA \ + NEXT_PUBLIC_APP_VERSION=$APP_VERSION \ + NEXT_PUBLIC_DEPLOY_ENV=$DEPLOY_ENV + RUN groupadd --system --gid 1001 nodejs && \ useradd --system --uid 1001 --no-log-init -g nodejs nextjs diff --git a/Dockerfile.prod b/Dockerfile.prod index 592b00a..4c8afc3 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -14,7 +14,6 @@ FROM base AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -# RUN bunx prisma migrate deploy RUN bunx prisma generate # Uncomment the following line in case you want to disable telemetry during the build.