Add Dockerfile for vue frontend

This commit is contained in:
Marcel Schwarz 2020-04-07 16:40:55 +02:00
parent 3c0e774a59
commit 217fbb75a5
2 changed files with 15 additions and 0 deletions

2
frontend/.dockerignore Normal file
View File

@ -0,0 +1,2 @@
dist
node_modules

13
frontend/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
# build stage
FROM node:12 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]