forked from learningequality/studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.prod
More file actions
54 lines (37 loc) · 1.3 KB
/
Dockerfile.prod
File metadata and controls
54 lines (37 loc) · 1.3 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
51
52
53
54
FROM node:20-trixie-slim AS node-builder
WORKDIR /contentcuration
COPY package.json pnpm-lock.yaml ./
RUN corepack enable pnpm && pnpm install --frozen-lockfile
COPY . .
# The webpack build, creating the frontend assets, later copied to the final image
RUN pnpm run build
FROM ghcr.io/astral-sh/uv:python3.10-trixie-slim
# Set the timezone
RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
ENV DEBIAN_FRONTEND=noninteractive
# Default Python file.open file encoding to UTF-8 instead of ASCII, workaround for le-utils setup.py issue
ENV LANG=C.UTF-8
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
gcc \
libpq-dev \
libssl-dev \
libffi-dev \
make \
git \
curl \
gettext \
libjpeg-dev \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /contentcuration
COPY requirements.txt /contentcuration/
# Install Python dependencies
RUN uv pip sync --system /contentcuration/requirements.txt
COPY . /contentcuration/
# Copy compiled frontend static output from node-builder
COPY --from=node-builder /contentcuration/contentcuration/contentcuration/static /contentcuration/contentcuration/contentcuration/static
ARG COMMIT_SHA
ENV RELEASE_COMMIT_SHA=$COMMIT_SHA
EXPOSE 8081
CMD ["make", "altprodserver"]