update image to 1.1

This commit is contained in:
2026-04-30 16:34:18 +02:00
parent 2d93d7175f
commit 6b381a8f89
4 changed files with 43 additions and 0 deletions

27
app/main.py Normal file
View File

@@ -0,0 +1,27 @@
import os, signal
from fastapi import FastAPI
app = FastAPI()
_healthy = True
@app.get("/")
def root ():
return {"poruka": "Hello iz mog Docker containera v2!"}
@app.get("/info")
def info():
return {
"python": platform.python_version(),
"verzija": "2.0"
}
@app.get("/health")
def health():
return {"status": "ok"}
@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"}