diff --git a/.dockerignore b/.dockerignore index 7a1408eda..0cfd62077 100644 --- a/.dockerignore +++ b/.dockerignore @@ -67,3 +67,6 @@ mailhog *.sqlite3 api/music api/media + +# Docker state +.state diff --git a/compose/context/docs/Dockerfile b/compose/context/docs/Dockerfile deleted file mode 100644 index 4c361e7c6..000000000 --- a/compose/context/docs/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM mwalbeck/python-poetry -RUN apt update && \ - apt install -y make diff --git a/compose/docs.sphinx.yml b/compose/docs.sphinx.yml new file mode 100644 index 000000000..b4b30973e --- /dev/null +++ b/compose/docs.sphinx.yml @@ -0,0 +1,19 @@ +services: + sphinx: + build: + context: ../ + dockerfile: docs/Dockerfile + init: true + ports: ["8001:8001"] + command: sh -c 'cd /src/docs && make dev' + volumes: + - ../docs:/src/docs + labels: + - "traefik.enable=true" + - "traefik.http.routers.test-funkwhale-docs-web.rule=Host(`docs.funkwhale.test`)" + - "traefik.http.routers.test-funkwhale-docs-web.entrypoints=web" + + - "traefik.http.routers.test-funkwhale-docs-webs.rule=Host(`docs.funkwhale.test`)" + - "traefik.http.routers.test-funkwhale-docs-webs.entrypoints=webs" + - "traefik.http.routers.test-funkwhale-docs-webs.tls=true" + networks: ["web"] diff --git a/docs/.dockerignore b/docs/.dockerignore new file mode 100644 index 000000000..21d0b898f --- /dev/null +++ b/docs/.dockerignore @@ -0,0 +1 @@ +.venv/ diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 000000000..ac0c80c14 --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,13 @@ +FROM mwalbeck/python-poetry +ENV DEBIAN_FRONTEND=noninteractive +ENV VIRTUAL_ENV=/venv +ENV PATH="/venv/bin:$PATH" +RUN --mount=type=cache,target=/var/lib/apt/lists \ + apt update; \ + apt install -y \ + curl \ + make +COPY . /src +WORKDIR /src/docs +RUN python3 -m venv --system-site-packages ${VIRTUAL_ENV} && . ${VIRTUAL_ENV}/bin/activate +RUN make install