Merge Sprint 7-8 CI/CD + Docker + Monitoring (HRT-33)
Some checks failed
CD / Deploy → Staging (push) Has been cancelled
CD / Smoke Tests on Staging (push) Has been cancelled
CD / Deploy → Production (push) Has been cancelled
CD / Rollback Production (push) Has been cancelled

This commit is contained in:
DevOps Engineer
2026-04-26 23:12:59 +02:00
36 changed files with 4700 additions and 723 deletions

View File

@@ -131,6 +131,24 @@ def get_db():
return conn
@app.route("/health")
@app.route("/turf/health")
def health():
"""Health check endpoint for Docker/load balancer. Returns 200 if app is running."""
import sqlite3 as _sqlite3
db_ok = True
try:
conn = _sqlite3.connect(DB_PATH, timeout=2)
conn.execute("SELECT 1")
conn.close()
except Exception:
db_ok = False
status = "ok" if db_ok else "degraded"
http_code = 200 if db_ok else 503
return {"status": status, "service": "combined-api", "db": db_ok}, http_code
@app.route("/")
def index():
return send_file("/home/h3r7/turf_saas/dashboard.html")