Skip to content

Commit d633853

Browse files
KEVIN NAYLORKEVIN NAYLOR
authored andcommitted
Dockerized
1 parent 88d27ab commit d633853

File tree

6 files changed

+20399
-6162
lines changed

6 files changed

+20399
-6162
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.git
2+
.idea
3+
node_modules

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Stage 1 - build the app
2+
FROM node:latest AS build
3+
LABEL maintainer="K-Nay"
4+
RUN mkdir /usr/src/app
5+
WORKDIR /usr/src/app
6+
ENV PATH /usr/src/app/node_modules/.bin:$PATH
7+
ENV PUBLIC_URL /
8+
COPY package.json /usr/src/app/package.json
9+
RUN npm install --silent
10+
RUN npm install react-scripts -g --silent
11+
COPY . /usr/src/app
12+
RUN npm run build
13+
14+
# Stage 2 - only use production bundle in image for smaller size
15+
FROM nginx:1.13.12-alpine
16+
COPY --from=build /usr/src/app/build /usr/share/nginx/html
17+
EXPOSE 80
18+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)