Skip to content

Commit

Permalink
Add js files to image build
Browse files Browse the repository at this point in the history
  • Loading branch information
samhotep committed Dec 4, 2024
1 parent b141737 commit cd81f4d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ RUN --mount=type=cache,target=/root/.cache/pip pip3 install --user --requirement
# ===
FROM node:18 AS yarn-dependencies
WORKDIR /srv
ADD package.json .
ADD . .
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn yarn install

# Build stage: Run "yarn run build-css"
# ===
FROM yarn-dependencies AS build-css
ADD static/sass static/sass
RUN yarn run build-css
FROM yarn-dependencies AS build
RUN yarn build

# Build the production image
# ===
Expand All @@ -49,7 +48,8 @@ WORKDIR /srv
# Import code, build assets and mirror list
ADD . .
RUN rm -rf package.json yarn.lock requirements.txt
COPY --from=build-css /srv/static/css static/css
COPY --from=build /srv/static/css static/css
COPY --from=build /srv/static/js/dist static/js/dist

# Set revision ID
ARG BUILD_ID
Expand Down

0 comments on commit cd81f4d

Please sign in to comment.