readme + docker

This commit is contained in:
Nicholas Orlowsky 2022-02-03 18:25:43 -06:00
parent 900325402c
commit 647a96ed44
No known key found for this signature in database
GPG key ID: DA69F4D62590FB49
7 changed files with 187 additions and 100 deletions

18
Dockerfile Normal file
View file

@ -0,0 +1,18 @@
# build environment
FROM node:13.12.0-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm install
RUN npm install react-scripts@3.4.1 -g --silent
COPY . ./
RUN npm run build
# production environment
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
COPY --from=build /app/nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]