Add dockerfile and enable Docs build
This commit is contained in:
22
docs/Dockerfile
Normal file
22
docs/Dockerfile
Normal 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
|
||||||
5
docs/nginx.conf
Normal file
5
docs/nginx.conf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
root /build;
|
||||||
|
}
|
||||||
@@ -46,10 +46,9 @@ services:
|
|||||||
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX}none:${MAILU_VERSION:-local}
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX}none:${MAILU_VERSION:-local}
|
||||||
build: ../core/none
|
build: ../core/none
|
||||||
|
|
||||||
# Uncomment next section after docs Dockerfile creation.
|
docs:
|
||||||
# docs:
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX}docs:${MAILU_VERSION:-local}
|
||||||
# image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX}docs:${MAILU_VERSION:-local}
|
build:
|
||||||
# build:
|
context: ../docs
|
||||||
# context: ../docs
|
args:
|
||||||
# args:
|
version: ${MAILU_VERSION:-local}
|
||||||
# version: ${MAILU_VERSION:-local}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user