blob: 827cde454d20eaca42a131d16bd68c8008995bcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# build stage
FROM node:14-alpine as build-stage
WORKDIR /app
COPY package*.json ./
# environment variables
ARG VUE_APP_BACKEND_URL
RUN npm install --production
COPY . .
RUN npm run build --production
# production stage
FROM nginx:stable-alpine as production-stage
COPY ./nginx.conf /temp/prod.conf
RUN envsubst /app < /temp/prod.conf > /etc/nginx/conf.d/default.conf
COPY --from=build-stage /app/dist/ /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
|