Skip to content

Commit

Permalink
Fix commit info env vars in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
aapeliv committed Mar 2, 2025
1 parent 00dc606 commit 9e3263a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ ENV NEXT_TELEMETRY_DISABLED=1
ARG version
ENV NEXT_PUBLIC_VERSION=$version

ARG commit_sha
ENV NEXT_PUBLIC_COMMIT_SHA=$commit_sha

ARG commit_timestamp
ENV NEXT_PUBLIC_COMMIT_TIMESTAMP=$commit_timestamp

COPY package.json yarn.lock ./
# https://github.com/yarnpkg/yarn/issues/8242
RUN yarn config set network-timeout 300000
Expand All @@ -21,9 +27,3 @@ RUN cp .env.$environment env && \
mv env .env.local

RUN yarn build

ARG commit_sha
ENV NEXT_PUBLIC_COMMIT_SHA=$commit_sha

ARG commit_timestamp
ENV NEXT_PUBLIC_COMMIT_TIMESTAMP=$commit_timestamp
6 changes: 6 additions & 0 deletions app/web/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ ENV NEXT_TELEMETRY_DISABLED 1
ARG version
ENV NEXT_PUBLIC_VERSION=$version

ARG commit_sha
ENV NEXT_PUBLIC_COMMIT_SHA=$commit_sha

ARG commit_timestamp
ENV NEXT_PUBLIC_COMMIT_TIMESTAMP=$commit_timestamp

COPY package.json yarn.lock ./
# https://github.com/yarnpkg/yarn/issues/8242
RUN yarn config set network-timeout 300000
Expand Down

0 comments on commit 9e3263a

Please sign in to comment.