-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 756 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 756 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
28
29
FROM python:3.12-slim-bookworm
ARG INSTALL_DEV=false
ENV PYTHONUNBUFFERED=1 \
UV_PROJECT_ENVIRONMENT=/opt/venv \
PATH="/opt/venv/bin:$PATH"
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
RUN apt-get update && \
apt-get install -y --no-install-recommends libpq-dev build-essential && \
if [ "$INSTALL_DEV" = "true" ]; then \
apt-get install -y --no-install-recommends nodejs npm; \
fi && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY pyproject.toml uv.lock ./
RUN if [ "$INSTALL_DEV" = "true" ]; then \
uv sync --frozen --no-install-project --group dev; \
else \
uv sync --frozen --no-install-project --no-dev; \
fi
COPY . /app/
RUN chmod +x /app/scripts/container-startup.sh