-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 804 Bytes
/
Dockerfile
File metadata and controls
27 lines (20 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM python:3.14-alpine
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Enable uv optimizations:
# UV_LINK_MODE=copy ensures dependencies are copied (isolated env)
ENV UV_LINK_MODE=copy
ENV UV_COMPILE_BYTECODE=0
# Change the working directory to the `app` directory
WORKDIR /app
# Install dependencies
# The "cache" mount allows efficient reuse of a uv cache on rebuilds
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project
# Copy the project into the image
COPY . .
# Sync the project
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen
CMD ["uv", "run", "uvicorn", "deadlock_assets_api.main:app", "--host", "0.0.0.0"]