-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.local
More file actions
30 lines (20 loc) · 648 Bytes
/
Dockerfile.local
File metadata and controls
30 lines (20 loc) · 648 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
30
FROM node:25-alpine AS base
# Install dependencies only when needed
FROM base AS deps
COPY . /app
WORKDIR /app
RUN apk add --no-cache python3 py3-pip
# Create and activate virtual environment, then install Python dependencies
RUN if [ -f server/python/requirements.txt ]; then \
python3 -m venv /opt/venv && \
. /opt/venv/bin/activate && \
pip install --no-cache-dir -r server/python/requirements.txt; \
fi
# Make sure the virtual environment is in PATH
ENV PATH="/opt/venv/bin:$PATH"
RUN npm install -g corepack --force && corepack enable
RUN yarn set version stable
RUN yarn
FROM deps AS runner
WORKDIR /app
CMD ["yarn", "dev"]