-
Notifications
You must be signed in to change notification settings - Fork 4
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
11 changed files
with
17 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
FROM node:14 as builder | ||
FROM nginx:1.21.6-alpine | ||
|
||
ENV PUBLIC_URL=. | ||
ENV CDS_URL= | ||
|
||
RUN mkdir -p /home/node/app && chown -R node:node /home/node/app | ||
WORKDIR /home/node/app | ||
RUN apk add -U --no-cache nghttp2-dev nodejs yarn | ||
|
||
RUN mkdir -p /home/node/app | ||
WORKDIR /home/node/app | ||
COPY package*.json ./ | ||
COPY yarn.lock ./ | ||
USER node | ||
RUN yarn install | ||
|
||
COPY --chown=node:node . . | ||
RUN yarn build | ||
|
||
FROM nginx:alpine | ||
COPY . . | ||
COPY default.conf /etc/nginx/conf.d/default.conf | ||
COPY --from=builder /home/node/app/build/ /usr/share/nginx/html | ||
CMD ["/bin/sh", "-c", "export REACT_APP_CDS_URL=${CDS_URL} && export REACT_APP_PUBLIC_URL=${PUBLIC_URL} && yarn build && cp -r /home/node/app/build/* /usr/share/nginx/html && cd /usr/share/nginx/html && nginx -g \"daemon off;\""] |
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
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 was deleted.
Oops, something went wrong.
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