Skip to content

Commit

Permalink
Added docker based build for deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
xivk committed Jul 28, 2020
1 parent b32d37b commit 5c61286
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/**/*
build/**/*
.DS_Store
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM mhart/alpine-node:11 AS build
WORKDIR /app
COPY . .
RUN npm install
RUN npm install react-scripts@3.4.1 -g
RUN yarn run build

# production environment
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit 5c61286

Please sign in to comment.