feat: show live build version in web UI
Build & Push Docker Image / build (push) Successful in 2m36s
Build & Push Docker Image / build (push) Successful in 2m36s
- /api/version returns version, commitSha, buildDate, trashRetentionDays - CI passes COMMIT_SHA (full), BUILD_DATE and VERSION (git tag) as docker build args; Dockerfile bakes them as env - sidebar footer shows version/sha linked to the Gitea commit - admin System tab shows version, commit link, build date, trash retention
This commit is contained in:
@@ -43,6 +43,13 @@ COPY --from=builder /app/artifacts/toolrate/dist artifacts/toolrate/dist
|
||||
ENV NODE_ENV=production
|
||||
ENV STATIC_DIR=/app/artifacts/toolrate/dist/public
|
||||
|
||||
ARG COMMIT_SHA=""
|
||||
ARG BUILD_DATE=""
|
||||
ARG VERSION=""
|
||||
ENV COMMIT_SHA=${COMMIT_SHA}
|
||||
ENV BUILD_DATE=${BUILD_DATE}
|
||||
ENV VERSION=${VERSION}
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["sh", "-c", "pnpm --filter @workspace/db run push-force && node --enable-source-maps artifacts/api-server/dist/index.mjs"]
|
||||
|
||||
Reference in New Issue
Block a user