-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
56 additions
and
73 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
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
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,22 +1,19 @@ | ||
FROM node:14-alpine3.11 as builder | ||
RUN apk --no-cache --update --virtual build-dependencies add \ | ||
python \ | ||
make \ | ||
g++ | ||
|
||
ARG BUILD_VERSION | ||
WORKDIR /dist | ||
COPY package*.json ./ | ||
COPY yarn*.lock ./ | ||
RUN true \ | ||
&& yarn autoclean --init \ | ||
&& yarn autoclean --force \ | ||
&& yarn install \ | ||
&& true | ||
FROM node:18-alpine AS builder | ||
|
||
RUN apk --no-cache --update --virtual build-dependencies add python3 make g++ | ||
|
||
WORKDIR /frontend | ||
|
||
COPY package.json yarn.lock ./ | ||
|
||
RUN yarn install | ||
|
||
COPY . . | ||
RUN yarn lint | tee 1.log | sed -e 's/^/[yarn lint] /' & yarn test | tee 2.log | sed -e 's/^/[yarn test] /' & yarn build --set-build-version "$BUILD_VERSION" | tee 3.log | sed -e 's/^/[yarn build] /' | ||
|
||
FROM nginx:1.20.2-alpine | ||
RUN yarn generate --dotenv .env.deploy | ||
|
||
FROM nginx:alpine | ||
|
||
COPY nginx.conf /etc/nginx/nginx.conf | ||
COPY --from=builder /build/dist /usr/share/nginx/html | ||
CMD ["nginx", "-g", "daemon off;"] | ||
|
||
COPY --from=builder /frontend/.output/public /usr/share/nginx/html |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: skaffold/v2beta28 | ||
kind: Config | ||
build: | ||
artifacts: | ||
- image: frontend |