feat: v2 - dodan /info endpoint, update image tag 1.0 -> 2.0
This commit is contained in:
12
app/main.py
12
app/main.py
@@ -1,8 +1,10 @@
|
|||||||
|
from fastapi import FastAPI
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
def root():
|
def root():
|
||||||
return {"message": "Pozdrav svijete!", "autor": "VAŠ_KORISNIK"}
|
return {"message": "Pozdrav svijete!", "autor": "nikolahrkac"}
|
||||||
|
|
||||||
@app.get("/health")
|
@app.get("/health")
|
||||||
def health():
|
def health():
|
||||||
@@ -13,8 +15,12 @@ app = FastAPI()
|
|||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
def root():
|
def root():
|
||||||
return {"message": "Pozdrav svijete!", "autor": "VAŠ_KORISNIK"}
|
return {"message": "Pozdrav svijete!", "autor": "nikolahrkac"}
|
||||||
|
|
||||||
@app.get("/health")
|
@app.get("/health")
|
||||||
def health():
|
def health():
|
||||||
return {"status": "ok"}
|
return {"status": "ok"}
|
||||||
|
|
||||||
|
@app.get("/info")
|
||||||
|
def info():
|
||||||
|
return {"servis": "priprema-za-kolokvij", "verzija": "2.0"}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: priprema-za-kolokvij
|
- name: priprema-za-kolokvij
|
||||||
image: git.fpmoz.sum.ba/nikolahrkac/priprema-za-kolokvij:1.0
|
image: git.fpmoz.sum.ba/nikolahrkac/priprema-za-kolokvij:2.0
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
Reference in New Issue
Block a user