feat: add /api/version endpoint with IMAGE_TAG; validate in ci healthcheck
Some checks are pending
CI/CD → Deploy via SSH / Build & Push Docker Images (push) Waiting to run
CI/CD → Deploy via SSH / Deploy via SSH (push) Blocked by required conditions
CI/CD → Deploy via SSH / Validate HTTPS & Endpoints (push) Blocked by required conditions

This commit is contained in:
MatheusAlves96 2026-04-21 00:23:25 -03:00
parent b0eb12c17d
commit 849789d376
4 changed files with 23 additions and 0 deletions

View 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"),
})