Merged
Conversation
54d77a6 to
c9a60f7
Compare
Captures git info (commit SHA, branch, commit message) at app startup and displays it alongside the deployment time in the preferences/about page. The commit SHA links to the GitHub commit page and hovering shows the commit message. https://claude.ai/code/session_016jtUbw7EGXX2hxDvvgBgQ8
Use a multi-stage Docker build to extract git info at build time: - Stage 1 (alpine + git + jq) reads .git and writes /git_info.json - Stage 2 copies the JSON to /etc/git_info.json (survives volume mounts) - apps.py checks /etc/git_info.json first, then falls back to live git Also un-ignores .git in .dockerignore so the first build stage can access it, and adds git_info.json to .gitignore. https://claude.ai/code/session_016jtUbw7EGXX2hxDvvgBgQ8
Prints the commit SHA, branch, and commit message to the server log when the Django app starts, making it easy to identify which version is running. https://claude.ai/code/session_016jtUbw7EGXX2hxDvvgBgQ8
Coolify doesn't include .git in the build context, causing "/.git: not found" during docker build. Replace the multi-stage git-info approach with build args (GIT_COMMIT_SHA, GIT_COMMIT_MSG, GIT_BRANCH) and add .git to .dockerignore since it's no longer needed. https://claude.ai/code/session_016jtUbw7EGXX2hxDvvgBgQ8
325e315 to
d10467d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added functionality to capture and display git repository information (commit SHA, branch, and commit message) on the About page in the admin preferences view.
Key Changes
_get_git_info()function inmedia/apps.pythat captures git metadata at application startup:GIT_INFOconstant frommedia/apps.pyfor use in viewspreferences_view()inmedia/views.pyto pass git info to the template contextmedia/templates/admin/preferences.htmlto display git information alongside the deployment time:Implementation Details
https://claude.ai/code/session_016jtUbw7EGXX2hxDvvgBgQ8