From 1bf12d38843406b0b9c362b3016582369378f9db Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Tue, 24 Mar 2026 11:08:30 -0400 Subject: [PATCH] fix: update Dockerfile and turbo.json to include APP_VERSION and GIT_COMMIT_SHA as environment variables - Added APP_VERSION and GIT_COMMIT_SHA arguments to Dockerfile for versioning and commit tracking. - Updated turbo.json to pass APP_VERSION and GIT_COMMIT_SHA as environment variables for build tasks. --- Dockerfile | 4 ++++ turbo.json | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d9d5a9f..b47974e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,10 +36,14 @@ RUN bunx turbo run build --filter=@sofa/web --filter=@sofa/server FROM base AS runner WORKDIR /app +ARG APP_VERSION +ARG GIT_COMMIT_SHA ENV NODE_ENV=production ENV PORT=3000 ENV HOSTNAME=0.0.0.0 ENV DATA_DIR=/data +ENV APP_VERSION=${APP_VERSION} +ENV GIT_COMMIT_SHA=${GIT_COMMIT_SHA} # API server + packages COPY --from=builder --chown=bun:bun /app/apps/server/ ./apps/server/ diff --git a/turbo.json b/turbo.json index df6ebc3..4d73453 100644 --- a/turbo.json +++ b/turbo.json @@ -4,7 +4,8 @@ "tasks": { "build": { "dependsOn": ["^build"], - "outputs": ["dist/**"] + "outputs": ["dist/**"], + "env": ["APP_VERSION", "GIT_COMMIT_SHA"] }, "dev": { "dependsOn": ["^build"],