ADD Docker support
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
|||||||
|
FROM ghcr.io/astral-sh/uv:python3.12-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENV UV_COMPILE_BYTECODE=1
|
||||||
|
|
||||||
|
ADD ./pyproject.toml .
|
||||||
|
ADD ./uv.lock .
|
||||||
|
ADD ./src .
|
||||||
|
RUN uv sync --frozen --no-dev
|
||||||
|
|
||||||
|
ENV PATH="/app/.venv/bin:$PATH"
|
||||||
|
|
||||||
|
ENTRYPOINT []
|
||||||
|
|
||||||
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
services:
|
||||||
|
web:
|
||||||
|
# Build the image from the Dockerfile in the current directory
|
||||||
|
build: .
|
||||||
|
|
||||||
|
# Host the FastAPI application on port 8000
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
|||||||
Reference in New Issue
Block a user