Skip to content

Instantly share code, notes, and snippets.

@pablohdzvizcarra
Last active May 22, 2021 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pablohdzvizcarra/8c0c06e61ed923d75f96ec85702cd233 to your computer and use it in GitHub Desktop.
Save pablohdzvizcarra/8c0c06e61ed923d75f96ec85702cd233 to your computer and use it in GitHub Desktop.
vue app with deploy yo nginx server
# build
FROM node:lts-alpine3.13 as dist
# set workdir in to container
WORKDIR /app
COPY package.json ./
COPY package-lock.json ./
RUN npm ci --silent
RUN npm install
COPY . ./
RUN npm run build
# production environment
FROM nginx:1.19.7-alpine
COPY --from=dist /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment