Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

feat: add commit hash to status endpoint #61

Merged
merged 1 commit into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ FROM node:lts
# NODE_ENV is used to configure some runtime options, like JSON logger
ENV NODE_ENV production

ARG COMMIT_HASH=local
ENV COMMIT_HASH=${COMMIT_HASH:-local}

WORKDIR /app
COPY --from=builderenv /app /app
COPY --from=builderenv /tini /tini
Expand Down
4 changes: 3 additions & 1 deletion src/controllers/handlers/status-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export async function statusHandler(
_context: Pick<HandlerContextWithPath<'metrics', '/status'>, 'url' | 'components'>
) {
return {
body: {}
body: {
commitHash: process.env.COMMIT_HASH
}
}
}