feat: show live build version in web UI
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:
opencode
2026-08-02 02:13:27 +02:00
parent 2f20b1e5c2
commit 803802a5b6
11 changed files with 247 additions and 3 deletions
+7
View File
@@ -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"]