fix(docs|compose): redo build to support make swagger

This commit is contained in:
jon r 2024-10-11 02:23:39 +02:00
parent ee4dea2ea0
commit a9c05ac886
5 changed files with 36 additions and 3 deletions

View File

@ -67,3 +67,6 @@ mailhog
*.sqlite3
api/music
api/media
# Docker state
.state

View File

@ -1,3 +0,0 @@
FROM mwalbeck/python-poetry
RUN apt update && \
apt install -y make

19
compose/docs.sphinx.yml Normal file
View File

@ -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"]

1
docs/.dockerignore Normal file
View File

@ -0,0 +1 @@
.venv/

13
docs/Dockerfile Normal file
View File

@ -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