initial commit
All checks were successful
Build and Push to ACR / Build and Push (push) Successful in 46s

Change-Id: I15e0d095273278f8531caa7399565fe92857a7ad
This commit is contained in:
Scaffolder
2026-03-18 18:18:32 +00:00
commit a4edf15862
15 changed files with 765 additions and 0 deletions

25
Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
# ---- Build stage (install deps) ----
FROM python:3.12-slim AS build
WORKDIR /app
RUN pip install --upgrade pip
COPY requirements.txt .
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
# ---- Runtime stage ----
FROM python:3.12-slim
WORKDIR /app
# Non-root user
RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser
USER appuser
COPY --from=build /install /usr/local
COPY app/ ./app/
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]