ci: add forgejo actions pipeline with traefik labels and https health checks
Some checks are pending
CI/CD → Portainer / Build & Push Docker Images (push) Waiting to run
CI/CD → Portainer / Deploy to Portainer (push) Blocked by required conditions
CI/CD → Portainer / Validate HTTPS & Endpoints (push) Blocked by required conditions

This commit is contained in:
MatheusAlves96 2026-04-21 00:06:22 -03:00
parent e6cb06255b
commit dcd18a07e6
7 changed files with 407 additions and 0 deletions

View file

@ -66,6 +66,15 @@ def create_app(config_name: str | None = None) -> Flask:
app.register_blueprint(agents_public_bp)
app.register_blueprint(agents_admin_bp)
@app.route("/health")
def health():
from flask import jsonify
try:
db.session.execute(db.text("SELECT 1"))
return jsonify({"status": "ok", "db": "ok"}), 200
except Exception as e:
return jsonify({"status": "error", "db": str(e)}), 503
@app.before_request
def track_page_view():
from flask import request as req