This commit is contained in:
schmelczerandras 2020-08-11 22:17:48 +02:00
parent fb044bc122
commit ba050930ba
7 changed files with 169 additions and 16 deletions

View file

@ -1,9 +1,23 @@
FROM node:latest as build
FROM schmelczera/error-pages as build-error-pages
RUN python build.py 403 404 50x
FROM node:latest as build-webpage
WORKDIR /home/node
COPY . .
COPY src src
COPY package.json custom.d.ts tsconfig.json webpack.config.js ./
RUN npm install
RUN npm run build
FROM nginx:alpine
COPY --from=build /home/node/dist/ /usr/share/nginx/html
WORKDIR /usr/share/nginx/html
RUN rm -rf *
COPY --from=build-webpage /home/node/dist .
COPY --from=build-error-pages /home/python/built errors
RUN find . -type f | xargs gzip -k9 &&\
chmod -R 555 .
COPY nginx-config /etc/nginx/