💩(summary) dockerize FastAPI app
Add a minimal docker file to run the FastAPI server.
This commit is contained in:
committed by
aleb_the_flash
parent
16bee00eb4
commit
d7d82130d9
17
src/summary/Dockerfile
Normal file
17
src/summary/Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM python:3.12-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY pyproject.toml .
|
||||
|
||||
RUN pip3 install --no-cache-dir .
|
||||
|
||||
FROM python:3.12-slim AS production
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /usr/local /usr/local
|
||||
COPY ./summary /app/summary
|
||||
|
||||
|
||||
CMD ["uvicorn", "summary.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user