feat: add /api/version endpoint with IMAGE_TAG; validate in ci healthcheck
This commit is contained in:
parent
b0eb12c17d
commit
849789d376
4 changed files with 23 additions and 0 deletions
13
backend/app/routes/version.py
Normal file
13
backend/app/routes/version.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import os
|
||||
from flask import Blueprint, jsonify
|
||||
|
||||
version_bp = Blueprint("version", __name__)
|
||||
|
||||
|
||||
@version_bp.get("/api/version")
|
||||
def get_version():
|
||||
"""Returns the running image tag — injected at deploy time via IMAGE_TAG env var."""
|
||||
return jsonify({
|
||||
"version": os.environ.get("IMAGE_TAG", "dev"),
|
||||
"env": os.environ.get("FLASK_ENV", "development"),
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue