Summary
The /health endpoint response includes version, commit, and build_time fields sourced from state.build_info. These values are intended to identify the deployed binary. However the Dockerfile does not set the corresponding CARGO_PKG_VERSION, GIT_COMMIT, or BUILD_TIME environment variables during the build step. As a result, all three fields are empty strings in every Docker-based deployment, making it impossible to identify which version is running from the health endpoint.
Expected Behavior
The /health endpoint should return the actual version, git commit SHA, and build timestamp of the running binary.
Proposed Solution
- Add
ARG GIT_COMMIT, ARG BUILD_TIME to the Dockerfile builder stage and pass them as ENV variables
- Set them in
docker-compose.full.yml and in the docker-publish CI workflow using --build-arg
- Read them in the application's
main.rs using std::env::var at startup
Affected Files
Dockerfile
docker-compose.full.yml
.github/workflows/docker-publish.yml
Summary
The
/healthendpoint response includesversion,commit, andbuild_timefields sourced fromstate.build_info. These values are intended to identify the deployed binary. However theDockerfiledoes not set the correspondingCARGO_PKG_VERSION,GIT_COMMIT, orBUILD_TIMEenvironment variables during the build step. As a result, all three fields are empty strings in every Docker-based deployment, making it impossible to identify which version is running from the health endpoint.Expected Behavior
The
/healthendpoint should return the actual version, git commit SHA, and build timestamp of the running binary.Proposed Solution
ARG GIT_COMMIT,ARG BUILD_TIMEto theDockerfilebuilder stage and pass them asENVvariablesdocker-compose.full.ymland in thedocker-publishCI workflow using--build-argmain.rsusingstd::env::varat startupAffected Files
Dockerfiledocker-compose.full.yml.github/workflows/docker-publish.yml