Support multiple docs versions

This commit is contained in:
kaiyou
2018-10-16 22:52:21 +02:00
parent 5035975c41
commit 8fa80c1589
5 changed files with 49 additions and 6 deletions

View File

@@ -2,6 +2,9 @@ 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 \
&& mkdir /run/nginx
@@ -9,6 +12,7 @@ RUN pip install -r /requirements.txt \
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
COPY . /docs
RUN sphinx-build /docs /build
RUN mkdir -p /build/$VERSION \
&& sphinx-build /docs /build/$VERSION
CMD nginx -g "daemon off;"