cicd
Some checks are pending
CI/CD Pipeline / build-and-push (push) Waiting to run

This commit is contained in:
ITO Mac
2026-04-14 11:02:09 +02:00
parent 1261b2ad1e
commit 37243df9aa
8 changed files with 241 additions and 2 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
# ---------- build stage ----------
FROM python:3.12-slim AS builder
WORKDIR /build
COPY app/requirements.txt .
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
# ---------- runtime stage ----------
FROM python:3.12-slim
LABEL maintainer="blazp04"
LABEL org.opencontainers.image.source="https://git.fpmoz.sum.ba/blazp04/distribuirani"
RUN adduser --disabled-password --no-create-home appuser
WORKDIR /app
COPY --from=builder /install /usr/local
COPY app/ .
USER appuser
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]