# main.py from fastapi import FastAPI app = FastAPI() _healthy = True @app.get("/health") def health(): if not _healthy: return {"status": "unhealthy"}, 503 return {"status": "ok"} @app.get("/") def root(): return {"message":"Hello iz mog Docker containere"} @app.post("/break") def break_health(): """Simulira pad servisa za testiranje liveness probe-a""" global _healthy _healthy = False return {"message": "Servis je sada nezdrav — ocekuj restart"}