-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
40e083a
commit a566798
Showing
2 changed files
with
19 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# build environment | ||
FROM node:18-alpine3.14 as build | ||
WORKDIR /app | ||
ENV PATH /app/node_modules/.bin:$PATH | ||
COPY package.json ./ | ||
COPY package-lock.json ./ | ||
RUN export NODE_OPTIONS=--max-old-space-size=8192 | ||
RUN npm ci --silent | ||
RUN npm install react-scripts@latest -g --silent | ||
COPY . ./ | ||
RUN npm run build | ||
|
||
# production environment | ||
FROM nginx:stable-alpine | ||
COPY --from=build /app/build /usr/share/nginx/html | ||
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |