Add dockerfile and enable Docs build

This commit is contained in:
Tim Möhlmann
2018-12-17 00:19:44 +02:00
parent fc83a7d829
commit 0739224fc4
3 changed files with 33 additions and 7 deletions

22
docs/Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
FROM python:3-alpine
COPY requirements.txt /requirements.txt
ARG version=master
ENV VERSION=$version
RUN pip install -r /requirements.txt \
&& apk add --no-cache nginx curl \
&& mkdir /run/nginx
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY . /docs
RUN mkdir -p /build/$VERSION \
&& sphinx-build /docs /build/$VERSION
EXPOSE 80/tcp
CMD nginx -g "daemon off;"
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1