Skip to content

Commit d13e6d6

Browse files
author
Paulo Guilherme Pinheiro Pereira
committed
Copy only mandatory dependencies to django
1 parent 659928e commit d13e6d6

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

packaging/container/Containerfile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22
FROM node:lts-alpine3.23 AS builder
33

44
WORKDIR /app
5-
COPY . .
6-
RUN npm install && export PATH=./node_modules/.bin:$PATH && npm run build-stylus && npm run build-riot && npm run concat-riot
5+
6+
COPY package.json package-lock.json* ./
7+
COPY src/static ./src/static
8+
9+
RUN npm install \
10+
&& export PATH=./node_modules/.bin:$PATH \
11+
&& npm run build-stylus \
12+
&& npm run build-riot \
13+
&& npm run concat-riot
714

815
# Stage 2: Python/Django
916
FROM almalinux:10-minimal
@@ -23,7 +30,12 @@ COPY pyproject.toml uv.lock ./
2330
# Install dependencies
2431
RUN uv sync --all-extras --frozen
2532

26-
2733
WORKDIR /app
28-
COPY --from=builder /app /app
34+
35+
COPY src ./src
36+
COPY manage.py ./
37+
38+
# Copy built static files from Node builder
39+
COPY --from=builder /app/src/static ./src/static
40+
2941
ENTRYPOINT ["/bin/bash", "-c"]

0 commit comments

Comments
 (0)