31 lines
1.3 KiB
YAML
31 lines
1.3 KiB
YAML
services:
|
|
ui:
|
|
build:
|
|
context: ../app
|
|
# The documentation of the UI component library lives within the same NPM package as the Funkwhale app, why we use its container.
|
|
dockerfile: Dockerfile.dev
|
|
command: yarn dev:docs --host 0.0.0.0
|
|
expose: ['5173']
|
|
ports:
|
|
- '8003:5173'
|
|
volumes:
|
|
- '../app:/app'
|
|
- '/app/node_modules'
|
|
networks: ['web']
|
|
# We need to overwrite the healthcheck, since the Docker image is actually scoped for running the UI.
|
|
healthcheck:
|
|
# And we need to talk IPv4, as the busybox prefers IPv6, fails and doesn't fall back to IPv4 for tryping again.
|
|
test: ['CMD-SHELL', 'wget --no-verbose --tries=1 --spider http://127.0.0.1:5173/ || exit 1']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
labels:
|
|
- 'traefik.enable=true'
|
|
- 'traefik.http.routers.test-funkwhale-ui-web.rule=Host(`ui.funkwhale.test`)'
|
|
- 'traefik.http.routers.test-funkwhale-ui-web.entrypoints=web'
|
|
- 'traefik.http.services.test-funkwhale-ui.loadbalancer.server.port=5173'
|
|
- 'traefik.http.routers.test-funkwhale-ui-webs.rule=Host(`ui.funkwhale.test`)'
|
|
- 'traefik.http.routers.test-funkwhale-ui-webs.entrypoints=webs'
|
|
- 'traefik.http.routers.test-funkwhale-ui-webs.tls=true'
|