-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (38 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
50 lines (38 loc) · 1.34 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
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM python:3.14-slim
ENV UV_VERSION=0.9.6
ENV NODE_VERSION=22.20.0
WORKDIR /app
# Install Node.js
RUN apt-get update && apt-get install -y curl xz-utils \
&& ARCH=$(dpkg --print-architecture) \
&& case "$ARCH" in \
amd64) NODE_ARCH="x64";; \
arm64) NODE_ARCH="arm64";; \
armhf) NODE_ARCH="armv7l";; \
*) echo "Unsupported architecture: $ARCH" && exit 1;; \
esac \
&& curl -fsSL "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$NODE_ARCH.tar.xz" \
| tar -xJ -C /usr/local --strip-components=1 \
&& rm -rf /var/lib/apt/lists/*
# Install uv
ADD https://astral.sh/uv/$UV_VERSION/install.sh /uv-installer.sh
RUN sh /uv-installer.sh && rm /uv-installer.sh
ENV PATH="/root/.local/bin/:$PATH"
# Install Node.js deps
COPY package.json package-lock.json ./
RUN npm ci
# Install Python deps
COPY pyproject.toml uv.lock ./
COPY src/ ./src/
# Provide a fallback version for setuptools_scm, which fails when the
# .git directory is not available in the Docker build context.
ARG VERSION="0.0.1"
ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SPHINX_RIJKSHUISSTIJL_2008_THEME=$VERSION
RUN uv pip install --system .[dev]
# Copy the rest of the application code
COPY . .
# Build the static assets
RUN npm run build
# Expose the port for the development server
EXPOSE 8000
CMD ["./entrypoint.sh"]