Skip to content

Commit 87361c4

Browse files
authored
Adding dockerfile configurations
1 parent 604dcdd commit 87361c4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# build environment
2+
FROM node:13.12.0-alpine as build
3+
WORKDIR /app
4+
ENV PATH /app/node_modules/.bin:$PATH
5+
COPY package.json ./
6+
COPY package-lock.json ./
7+
RUN npm ci --silent
8+
RUN npm install react-scripts@3.4.1 -g --silent
9+
COPY . ./
10+
RUN npm run build
11+
12+
# production environment
13+
FROM nginx:stable-alpine
14+
COPY --from=build /app/build /usr/share/nginx/html
15+
# new
16+
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
17+
EXPOSE 3000
18+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)