init: hello-cicd project setup

This commit is contained in:
2026-04-14 10:37:31 +02:00
parent fcab094566
commit 10e9d8ca26
5 changed files with 70 additions and 0 deletions

16
main.py Normal file
View File

@@ -0,0 +1,16 @@
from fastapi import FastAPI
import os, datetime
app = FastAPI()
@app.get("/health")
def health():
return {
"status": "ok",
"version": os.getenv("APP_VERSION", "dev"),
"timestamp": datetime.datetime.utcnow().isoformat()
}
@app.get("/")
def root():
return {"poruka": "Zdravo s k3s!", "host": os.uname().nodename}