From e2a8ac13eb9599f38b9e2c9aaf692d6b42b45cea Mon Sep 17 00:00:00 2001 From: Do Siki Date: Tue, 18 Aug 2026 21:22:40 +0200 Subject: [PATCH] fix(deploy): declare DEPLOY_VERSION ARG in the runner stage ENV does not carry across build stages: the value set in the builder never reached the running container, so /api/health reported deployVersion: null and SMOKE-01 failed. Re-declare the ARG in the runner stage. --- proto/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/proto/Dockerfile b/proto/Dockerfile index c65192f..1f4144a 100755 --- a/proto/Dockerfile +++ b/proto/Dockerfile @@ -10,10 +10,6 @@ ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL ARG NEXT_PUBLIC_DEPLOY_ENV ENV NEXT_PUBLIC_DEPLOY_ENV=$NEXT_PUBLIC_DEPLOY_ENV -# Runtime-only deploy version (git SHA passed by deploy.sh) — exposed via /api/health. -ARG DEPLOY_VERSION -ENV DEPLOY_VERSION=$DEPLOY_VERSION - # Copy package files COPY package.json package-lock.json* ./ @@ -37,6 +33,12 @@ ENV NODE_ENV=production # to the container IP. Bind explicitly to all interfaces for port publishing and healthchecks. ENV HOSTNAME=0.0.0.0 +# Runtime-only deploy version (git SHA from deploy.sh). WHY re-declared here: ENV does +# not carry across stages — the value set in the builder stage never reaches the +# container that actually runs. +ARG DEPLOY_VERSION +ENV DEPLOY_VERSION=$DEPLOY_VERSION + # Create non-root user for security RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs