2
0
mirror of https://github.com/offen/website.git synced 2024-12-24 05:40:22 +01:00
website/build/Dockerfile

30 lines
704 B
Docker
Raw Normal View History

FROM nikolaik/python-nodejs:python3.7-nodejs10 as homepage
2019-09-04 20:50:53 +02:00
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
2019-10-27 12:53:08 +01:00
RUN npm install -g postcss-cli@^6.1.3 autoprefixer@^9.7.0 svgo@^1.3.0
2019-09-04 20:50:53 +02:00
RUN apt-get update \
&& apt-get install -y libjpeg-progs optipng \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /code/homepage
2019-10-27 21:14:52 +01:00
ENV PATH "/root/.local/bin:$PATH"
ENV NODE_PATH="/usr/lib/node_modules"
2019-09-04 20:50:53 +02:00
RUN pip install --user -r requirements.txt
RUN make publish
FROM nginx:1.17-alpine
LABEL maintainer="mail@offen.dev"
ARG robots
ENV ROBOTS_FILE=$robots
2019-09-04 20:50:53 +02:00
COPY --from=homepage /code/homepage/output /www/data
2019-10-10 10:02:54 +02:00
COPY ./build/$ROBOTS_FILE /www/data/robots.txt
COPY ./build/nginx.conf /etc/nginx/nginx.conf
2019-09-04 20:50:53 +02:00
EXPOSE 80