2
0
mirror of https://github.com/offen/website.git synced 2024-12-28 07:10:24 +01:00
website/build/proxy/Dockerfile

69 lines
1.8 KiB
Docker
Raw Normal View History

2019-09-04 20:50:53 +02:00
FROM node:10 as auditorium
COPY ./auditorium/package.json ./auditorium/package-lock.json /code/deps/
2019-09-04 20:50:53 +02:00
COPY ./packages /code/packages
2019-09-09 22:30:11 +02:00
WORKDIR /code/deps
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
RUN npm ci
2019-09-09 22:30:11 +02:00
COPY ./auditorium /code/auditorium
2019-09-04 20:50:53 +02:00
COPY ./banner.txt /code/banner.txt
WORKDIR /code/auditorium
2019-09-09 22:30:11 +02:00
RUN cp -a /code/deps/node_modules /code/auditorium/
2019-09-04 20:50:53 +02:00
ENV NODE_ENV production
RUN npm run build
FROM node:10 as script
COPY ./script/package.json ./script/package-lock.json /code/deps/
2019-09-04 20:50:53 +02:00
COPY ./packages /code/packages
2019-09-09 22:30:11 +02:00
WORKDIR /code/deps
2019-09-04 20:50:53 +02:00
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
RUN npm ci
2019-09-09 22:30:11 +02:00
COPY ./script /code/script
COPY ./banner.txt /code/banner.txt
WORKDIR /code/script
RUN cp -a /code/deps/node_modules /code/script/
2019-09-04 20:50:53 +02:00
ENV NODE_ENV production
RUN npm run build
FROM node:10 as vault
COPY ./vault/package.json ./vault/package-lock.json /code/deps/
2019-09-04 20:50:53 +02:00
COPY ./packages /code/packages
2019-09-09 22:30:11 +02:00
WORKDIR /code/deps
2019-09-04 20:50:53 +02:00
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
RUN npm ci
2019-09-09 22:30:11 +02:00
COPY ./vault /code/vault
COPY ./banner.txt /code/banner.txt
WORKDIR /code/vault
RUN cp -a /code/deps/node_modules /code/vault/
2019-09-04 20:50:53 +02:00
ENV NODE_ENV production
RUN npm run build
FROM nikolaik/python-nodejs:python3.6-nodejs10 as homepage
2019-09-11 12:44:51 +02:00
ARG siteurl
ENV SITEURL=$siteurl
2019-09-04 20:50:53 +02:00
COPY ./homepage /code/homepage
RUN npm install svgo -g
RUN apt-get update \
&& apt-get install -y libjpeg-progs optipng \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /code/homepage
ENV PATH /root/.local/bin:$PATH
RUN pip install --user -r requirements.txt
RUN make publish
FROM nginx:1.17-alpine
COPY --from=homepage /code/homepage/output /www/data
2019-09-05 11:18:42 +02:00
COPY --from=script /code/script/dist /www/data
2019-09-04 20:50:53 +02:00
COPY --from=auditorium /code/auditorium/dist /www/data/auditorium
COPY --from=vault /code/vault/dist /www/data/vault
COPY ./build/proxy/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80