diff --git a/app/Dockerfile b/app/Dockerfile index f4c96b5..b6b93cc 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -7,7 +7,7 @@ COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Kopiraj kod NAKON instalacije -COPY app/ ./app/ +COPY . ./app/ EXPOSE 8000 diff --git a/app/main.py b/app/main.py index 6b922ac..b586b42 100644 --- a/app/main.py +++ b/app/main.py @@ -4,8 +4,12 @@ app = FastAPI() @app.get("/") def root(): - return {"message": "Pozdrav svijete!", "autor": "VAŠ_KORISNIK"} + return {"message": "Pozdrav svijete! (v2)", "autor": "VAŠ_KORISNIK"} @app.get("/health") def health(): - return {"status": "ok"} \ No newline at end of file + return {"status": "ok", "version": "2.0"} + +@app.get("/info") +def info(): + return {"servis": "priprema-za-kolokvij", "verzija": "2.0"} \ No newline at end of file diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 2978b92..e049560 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: priprema-za-kolokvij - image: git.fpmoz.sum.ba/blazp04/priprema-za-kolokvij:1.0 + image: git.fpmoz.sum.ba/blazp04/priprema-za-kolokvij:2.0 ports: - containerPort: 8000 resources: