Fix version display in side navigation (#306)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
+8
-9
@@ -30,13 +30,20 @@ RUN apk add --no-cache libc6-compat
|
||||
RUN apk update
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
# First install the dependencies (as they change less often)
|
||||
COPY .gitignore .gitignore
|
||||
COPY --from=builder /app/out/json/ .
|
||||
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
|
||||
# Build arguments for version information
|
||||
# Placed after install to preserve dependency cache when version changes
|
||||
ARG APP_VERSION=unknown
|
||||
ARG GIT_SHA=unknown
|
||||
|
||||
# Set version as environment variables for Next.js build
|
||||
ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION
|
||||
ENV NEXT_PUBLIC_GIT_SHA=$GIT_SHA
|
||||
|
||||
# Build the project
|
||||
COPY --from=builder /app/out/full/ .
|
||||
@@ -46,14 +53,6 @@ RUN pnpm turbo run build --filter=web...
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
|
||||
# Build arguments for version information
|
||||
ARG APP_VERSION=unknown
|
||||
ARG GIT_SHA=unknown
|
||||
|
||||
# Set version as environment variables
|
||||
ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION
|
||||
ENV NEXT_PUBLIC_GIT_SHA=$GIT_SHA
|
||||
|
||||
COPY --from=installer /app/apps/web/next.config.js .
|
||||
COPY --from=installer /app/apps/web/package.json .
|
||||
COPY --from=installer /app/pnpm-lock.yaml .
|
||||
|
||||
Reference in New Issue
Block a user