Enhance web server
This commit is contained in:
parent
0390c74061
commit
7c68deef24
3 changed files with 79 additions and 4 deletions
|
|
@ -1,9 +1,30 @@
|
|||
FROM node:latest as build
|
||||
FROM python:3.8-alpine as build-error-pages
|
||||
|
||||
WORKDIR /home/python
|
||||
COPY error-pages .
|
||||
RUN python build.py
|
||||
|
||||
|
||||
FROM node:latest as build-webpage
|
||||
|
||||
WORKDIR /home/node
|
||||
COPY . .
|
||||
|
||||
COPY src src
|
||||
COPY static static
|
||||
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/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue