Skip to content

feat: copy VERSION into the image for runtime version lookup - #16

Merged
vlauciani merged 1 commit into
mainfrom
add-version-file
Nov 24, 2026
Merged

vlauciani merged 1 commit into
mainfrom
add-version-file

Conversation

@vlauciani

Copy link
Copy Markdown
Member

Summary

Copy the repo's VERSION file into the image, so the running container can tell which release it is. Apollo's /api/status reads it through a /version shell2http route added to its compose files.

Apollo GET /api/status
  GET http://pyml:8080/version      # shell2http route, Apollo compose
    cat /opt/VERSION || true         # file added by this PR
+COPY VERSION /opt/VERSION
 ENTRYPOINT ["bash", "/opt/entrypoint.sh"]

Copied last, so a version bump rebuilds only that layer. VERSION has matched the git tag at every release since v1.1.0, so it must keep being bumped before tagging.

Evidence

Local Apollo dev stack, pyml service running the current image vs. the same image plus COPY VERSION /opt/VERSION:

  • Before: GET /version -> 200, empty body; /api/status -> "pyml": {"version": null}
    After: GET /version -> 200, v1.7.0; /api/status -> "pyml": {"version": "1.7.0"}

Merge Danger

Door: two-way

One extra file in the image; entrypoint and results unchanged.

Blast Radius: none

Images built before this PR keep working with the new Apollo: they answer an empty body and Apollo reports null.

@vlauciani
vlauciani merged commit 4b188c8 into main Nov 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant