fix(compose): add openapi to docs

This commit is contained in:
jon r 2024-10-11 02:24:43 +02:00
parent a9c05ac886
commit 11ce5302ba
3 changed files with 22 additions and 28 deletions

View File

@ -2,21 +2,6 @@ name: funkwhale-docs
networks:
web:
external: true
services:
sphinx:
build:
context: "compose/context/docs"
init: true
ports: ["8001:8001"]
command: sh -c 'cd /src/docs && make install && make dev'
volumes:
- ${PWD}:/src
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami-web.rule=Host(`docs.funkwhale.test`)"
- "traefik.http.routers.whoami-web.entrypoints=web"
- "traefik.http.routers.whoami-webs.rule=Host(`docs.funkwhale.test`)"
- "traefik.http.routers.whoami-webs.entrypoints=webs"
- "traefik.http.routers.whoami-webs.tls=true"
networks: ["web"]
include:
- path: compose/docs.sphinx.yml
- path: compose/docs.openapi.yml

View File

@ -1,10 +0,0 @@
services:
api-docs:
image: swaggerapi/swagger-ui:v3.37.2
environment:
- "API_URL=/swagger.yml"
ports:
- "8002:8080"
volumes:
- "./docs/swagger.yml:/usr/share/nginx/html/swagger.yml"
- "./docs/api:/usr/share/nginx/html/api"

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

@ -0,0 +1,19 @@
services:
openapi:
image: swaggerapi/swagger-ui
environment:
- "URL=/openapi.yml"
ports:
- "8002:8080"
volumes:
- "../docs/specs/nodeinfo21/schema.yml:/usr/share/nginx/html/openapi.yml"
# - "../docs/api:/usr/share/nginx/html/api"
labels:
- "traefik.enable=true"
- "traefik.http.routers.test-funkwhale-openapi-web.rule=Host(`openapi.funkwhale.test`)"
- "traefik.http.routers.test-funkwhale-openapi-web.entrypoints=web"
- "traefik.http.services.test-funkwhale-openapi.loadbalancer.server.port=8080"
- "traefik.http.routers.test-funkwhale-openapi-webs.rule=Host(`openapi.funkwhale.test`)"
- "traefik.http.routers.test-funkwhale-openapi-webs.entrypoints=webs"
- "traefik.http.routers.test-funkwhale-openapi-webs.tls=true"
networks: ["web"]