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

Change-Id: I3184ea3bc23ecc769c9de5fad0a0a0229e353629
This commit is contained in:
Scaffolder
2026-03-23 23:19:03 +00:00
commit d10e2ce029
19 changed files with 1089 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"]