-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 1.02 KB
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
28
29
30
31
32
33
34
35
36
37
from ghcr.io/astral-sh/uv:0.9.21 as uv_image
from python:3.11-slim-bookworm as builder
copy --from=uv_image /uv /usr/local/bin/uv
run apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
env PORT=8000
workdir /app
copy CONTRIBUTING.md LICENSE /app/
env UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1 \
UV_PYTHON_DOWNLOADS=never \
UV_SYSTEM_PYTHON=1 \
UV_PROJECT_ENVIRONMENT=/usr/local
# Copy local version of the registry and install reqs
copy uv.lock pyproject.toml /app/
copy schemas /app/schemas
copy yard /app/yard
copy README.md /app/
# Needed to grab the VCS version from git tags
run --mount=type=bind,target=/app/.git,source=.git uv sync --all-extras --frozen
copy tasks.py /app/
# Regenerate models from the current schemas
run invoke regenerate-models
# Validate all entries against the schema
run invoke validate-entries
cmd uvicorn yard.app:app --host 0.0.0.0 --port ${PORT}
healthcheck --interval=5m --timeout=3s --start-period=10s \
cmd curl --fail http://localhost:${PORT}/api || exit 1