Vue.js 3 based frontend

This commit is contained in:
2022-10-05 17:43:41 +03:00
parent 5fe7f45728
commit b6f21b8192
21 changed files with 6569 additions and 21005 deletions

View File

@@ -1,39 +1,9 @@
# pull official base image
FROM node AS builder
FROM node:16-alpine
# set working directory
WORKDIR /app
EXPOSE 8080
CMD ["npm", "run", "dev"]
# install app dependencies
#copies package.json and package-lock.json to Docker environment
COPY package.json ./
# Installs all node packages
RUN npm install
# Copies everything over to Docker environment
COPY . ./
RUN npm run build
#Stage 2
#######################################
#pull the official nginx:1.19.0 base image
FROM nginx
#copies React to the container directory
# Set working directory to nginx resources directory
WORKDIR /usr/share/nginx/html
# Remove default nginx static resources
RUN rm -rf ./*
RUN apt-get install bash
# Copies configuration files
COPY ./default.conf /etc/nginx/conf.d/default.conf
# Copies static resources from builder stage
COPY --from=builder /app/build .
# Containers run nginx with global directives and daemon off
ENTRYPOINT ["nginx", "-g", "daemon off;"]
COPY package* ./
RUN npm install
COPY . .