[Vue] Vue app dockerize (nginx์‚ฌ์šฉ)


๐Ÿ’ก ํ”„๋ก ํŠธ์— vue app ๋งŒ ๋‹จ๋…์œผ๋กœ ๋„์šธ๊ฒฝ์šฐ nginx๋ฅผ ์‚ฌ์šฉํ•ด ๋„์›Œ์ค˜์•ผํ•จ

์•„๋ž˜์™€ ๊ฐ™์ด ๋„์ปคํŒŒ์ผ์„ ์ž‘์„ฑํ•˜๋ฉด ๋œ๋‹ค

# build stage
FROM node:lts-alpine 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;"]

https://v2.vuejs.org/v2/cookbook/dockerize-vuejs-app.html




ยฉ 2020. by berrrrr

Powered by berrrrr