File tree Expand file tree Collapse file tree 7 files changed +103
-22081
lines changed Expand file tree Collapse file tree 7 files changed +103
-22081
lines changed Original file line number Diff line number Diff line change 1+ /node_modules
2+
3+ /build
4+
5+ .git
6+
7+ * .md
8+
9+ .gitignore
Original file line number Diff line number Diff line change 1717.env.development.local
1818.env.test.local
1919.env.production.local
20-
20+ .env
2121npm-debug.log *
2222yarn-debug.log *
2323yarn-error.log *
Original file line number Diff line number Diff line change 1+ worker_processes 4;
2+
3+ events { worker_connections 1024 ; }
4+
5+ http {
6+ server {
7+ listen 80 ;
8+ root /usr/share/nginx/html;
9+ include /etc/nginx/mime.types ;
10+
11+ location / {
12+ try_files $uri /index .html;
13+ }
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ # stage1 as builder
2+ FROM node:16-alpine as builder
3+
4+ # copy the package.json to install dependencies
5+ COPY package.json package-lock.json ./
6+
7+ # Install the dependencies and make the folder
8+ RUN npm install && mkdir /react-ui && mv ./node_modules ./react-ui
9+
10+ WORKDIR /react-ui
11+
12+ COPY . .
13+
14+ # Build the project and copy the files
15+ RUN npm run build
16+
17+
18+ FROM nginx:1.20-alpine
19+
20+ # !/bin/sh
21+
22+ COPY ./.nginx/nginx.conf /etc/nginx/nginx.conf
23+
24+ # # Remove default nginx index page
25+ RUN rm -rf /usr/share/nginx/html/*
26+
27+ # Copy from the stage 1
28+ COPY --from=builder /react-ui/build /usr/share/nginx/html
29+
30+ EXPOSE 443 80
You can’t perform that action at this time.
0 commit comments