This commit is contained in:
2026-06-09 10:11:07 +02:00
commit 35d8ce8559
7 changed files with 23 additions and 0 deletions

0
.dockerignore Normal file
View File

7
Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app/ ./app/
EXPOSE 8000
CMD ["uvicorn","app.main:app","--host","0.0.0.0","--port","8000"]

14
app/main.py Normal file
View File

@@ -0,0 +1,14 @@
import os
from fastapi import FastAPI
app = FastAPI()
AUTOR = os.getenv("dinkoglc", "nepoznat")
@app.get("/")
def root():
return {"message": "Kolokvij 2", "autor": "dinkoglc"}
@app.get("/health")
def health():
return {"status": "ok"}

0
k8s/deployment.yaml Normal file
View File

0
k8s/ingress.yaml Normal file
View File

0
k8s/service.yaml Normal file
View File

2
requirements.txt Normal file
View File

@@ -0,0 +1,2 @@
fastapi==0.111.0
uvicorn[standard]==0.29.0