This commit is contained in:
ITO Mac
2026-05-04 16:10:31 +02:00
parent 00cac53ff3
commit 739f70b440
7 changed files with 221 additions and 0 deletions

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM python:3.12-slim AS builder
WORKDIR /builder
COPY app/requirements.txt .
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
FROM python:3.12-slim
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"]