-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 1.07 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
FROM python:3.12-slim
ARG TABLESETTER_BUILD_REF=workspace
ARG TABLESETTER_IMAGE_REF=tablesetter:unknown
ARG TABLESETTER_SOURCE_HASH=unknown
ARG TABLESETTER_WORKTREE_STATUS=unknown
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PATH="/app/.venv/bin:${PATH}" \
TABLESETTER_BUILD_REF="${TABLESETTER_BUILD_REF}" \
TABLESETTER_IMAGE_REF="${TABLESETTER_IMAGE_REF}" \
TABLESETTER_SOURCE_HASH="${TABLESETTER_SOURCE_HASH}" \
TABLESETTER_WORKTREE_STATUS="${TABLESETTER_WORKTREE_STATUS}"
LABEL org.opencontainers.image.revision="${TABLESETTER_BUILD_REF}" \
org.opencontainers.image.version="${TABLESETTER_SOURCE_HASH}" \
org.opencontainers.image.ref.name="${TABLESETTER_IMAGE_REF}" \
io.tablesetter.worktree-status="${TABLESETTER_WORKTREE_STATUS}"
WORKDIR /app
COPY pyproject.toml README.md ./
COPY src ./src
RUN python -m venv .venv \
&& .venv/bin/pip install --no-cache-dir --upgrade pip \
&& .venv/bin/pip install --no-cache-dir .
EXPOSE 8000
CMD ["uvicorn", "tablesetter.interfaces.http.app:app", "--host", "0.0.0.0", "--port", "8000"]