-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use multi-stage build for frontend container.
- Loading branch information
Showing
2 changed files
with
13 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
FROM node:23.1.0-alpine3.20 AS compile-image | ||
|
||
WORKDIR /home/frontend | ||
COPY public /home/frontend/public | ||
COPY package*.json /home/frontend | ||
COPY src /home/frontend/src | ||
COPY .env /home/frontend | ||
RUN npm install --ignore-scripts && \ | ||
npm run --ignore-scripts build | ||
|
||
FROM node:23.1.0-alpine3.20 | ||
|
||
LABEL maintainer="Quality-time team <[email protected]>" | ||
LABEL description="Quality-time frontend" | ||
|
||
WORKDIR /home/frontend | ||
COPY package*.json /home/frontend | ||
COPY public /home/frontend/public | ||
COPY src /home/frontend/src | ||
COPY healthcheck.js /home/frontend | ||
COPY .env /home/frontend | ||
RUN npm install --ignore-scripts -g [email protected] && \ | ||
npm install --ignore-scripts && \ | ||
npm install --ignore-scripts -g [email protected] && \ | ||
npm run --ignore-scripts build && \ | ||
COPY --from=compile-image /home/frontend/build /home/frontend/build | ||
RUN npm install --ignore-scripts -g [email protected] && \ | ||
adduser frontend --disabled-password | ||
USER frontend | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,7 @@ RUN apk add --no-cache \ | |
chromium=130.0.6723.116-r0 && \ | ||
rm -rf /var/cache/apk/* /tmp/* && \ | ||
update-ms-fonts && \ | ||
fc-cache -f && \ | ||
npm install --ignore-scripts -g [email protected] | ||
fc-cache -f | ||
|
||
WORKDIR /home/renderer | ||
COPY package*.json /home/renderer/ | ||
|