Files
hello-cicd/main.py
Ivan Filipovic 9d98f5b466
All checks were successful
CI/CD Pipeline / build (push) Successful in 1m38s
CI/CD Pipeline / deploy (push) Successful in 1m36s
feat: verzija v2.0
2026-04-20 23:11:02 +02:00

18 lines
364 B
Python

# main.py
from fastapi import FastAPI
import os, datetime
app = FastAPI()
@app.get("/health")
def health():
return {
"status": "ok",
"version": os.getenv("deployment.yaml", "dev"),
"timestamp": datetime.datetime.utcnow().isoformat()
}
@app.get("/")
def root():
return {"poruka": "Zdravo s k3s!", "host": os.uname().nodename}