Add Dockerfile for vue frontend
This commit is contained in:
parent
3c0e774a59
commit
217fbb75a5
2
frontend/.dockerignore
Normal file
2
frontend/.dockerignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
dist
|
||||||
|
node_modules
|
13
frontend/Dockerfile
Normal file
13
frontend/Dockerfile
Normal 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;"]
|
Loading…
Reference in New Issue
Block a user