You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
FROM node:alpine as builder
|
|
|
|
WORKDIR /build-quotes
|
|
COPY apps/quotes/package.json apps/quotes/package-lock.json ./
|
|
|
|
RUN npm install && mkdir /quotes && cp -r node_modules/ /quotes
|
|
|
|
WORKDIR /quotes
|
|
COPY apps/quotes .
|
|
|
|
RUN $(npm bin)/ng build --prod --build-optimizer --output-hashing=none
|
|
|
|
WORKDIR /build-comments
|
|
COPY apps/comments/package.json apps/comments/package-lock.json ./
|
|
|
|
RUN npm install && mkdir /comments && cp -r node_modules/ /comments
|
|
|
|
WORKDIR /comments
|
|
COPY apps/comments .
|
|
|
|
RUN $(npm bin)/ng build --prod --build-optimizer --output-hashing=none
|
|
|
|
WORKDIR /build-schedule
|
|
COPY apps/schedule/package.json apps/schedule/package-lock.json ./
|
|
|
|
RUN npm install && mkdir /schedule && cp -r node_modules/ /schedule
|
|
|
|
WORKDIR /schedule
|
|
COPY apps/schedule .
|
|
|
|
RUN $(npm bin)/ng build --prod --build-optimizer --output-hashing=none
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY nginx/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
COPY --from=builder /quotes/dist /quotes/quotes/assets
|
|
COPY --from=builder /comments/dist /comments/comments/assets
|
|
COPY --from=builder /schedule/dist /schedule/schedule/assets
|
|
|
|
RUN addgroup -g 9999 lilia
|
|
|
|
EXPOSE 80
|
|
|
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|