init: FastAPI priprema-za-kolokvij + k8s manifesti (monorepo)

This commit is contained in:
2026-05-26 10:18:11 +02:00
commit bc51255f78
7 changed files with 92 additions and 0 deletions

15
Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM python:3.12-slim
WORKDIR /app
# Kopiraj ovisnosti PRVO — ako se ne mijenjaju, pip install se preskace (cache hit)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Kopiraj kod NAKON instalacije
COPY app/ ./app/
EXPOSE 8000
# OBAVEZNO: --host 0.0.0.0 da Ingress moze pristupiti containeru
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]