update image to 1.1

This commit is contained in:
2026-04-30 22:25:30 +02:00
parent 260ad28e7f
commit c99dbffa5a

View File

@@ -2,10 +2,23 @@ from fastapi import FastAPI
app = FastAPI()
_healthy = True # DODANO
@app.get("/")
def root():
return {"message": "Pozdrav svijete"}
@app.get("/health")
def health():
if not _healthy: # DODANO
return {"status": "unhealthy"}
return {"status": "ok"}
@app.post("/break") # DODANO
def break_health():
global _healthy
_healthy = False
return {"message": "Servis je sada nezdrav — ocekuj restart"}