[add] Basic Dockerfile

Still needs some work to load the favicon
This commit is contained in:
Jose Pablo Domingo Aramburo Sanchez 2020-11-28 23:56:16 -07:00
parent 3716709a9b
commit 8d75a80ac6
No known key found for this signature in database
GPG Key ID: F9CD566E5FC231F2
2 changed files with 25 additions and 0 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
.git
node_modules
Dockerfile
dist/

21
Dockerfile Normal file
View File

@ -0,0 +1,21 @@
# Stage 1 - the build process
FROM node:12 as build-deps
WORKDIR /usr/src/app
COPY package.json /usr/src/app
COPY package-lock.json /usr/src/app
RUN npm install
COPY . /usr/src/app
RUN npm run build
# Stage 2 - the production environment
FROM nginx:1-alpine
COPY --from=build-deps /usr/src/app/dist /usr/share/nginx/html/dist
COPY --from=build-deps /usr/src/app/index.html /usr/share/nginx/html
COPY --from=build-deps /usr/src/app/images /usr/share/nginx/html/images
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]