Serve ustreamer via subpath

Resolves #17
This commit is contained in:
Markus Küffner
2022-04-18 21:05:09 +02:00
parent ad58ab8d7c
commit 27e33d5d7e
2 changed files with 10 additions and 6 deletions

View File

@@ -133,7 +133,7 @@ Example from service Klipper:
### Multiple Webcams
The Ustreamer Service is already templated to be easily reused for multi-webcam Setups.
To add a new Ustreamer Service, simply add the following snippet to ``docker-compose.override.yaml``.
Notice, that all service names, container names and traefik labels need to be unique.
Notice, that all service names, container names and traefik labels need to be unique while the right side of the passed Device (`:/dev/webcam`) always stays the same.
Hence replace webcam2 with webcam3 and so on for every webcam you add and update the physical device that gets passed to the container.
```yaml
webcam2:
@@ -146,6 +146,8 @@ Hence replace webcam2 with webcam3 and so on for every webcam you add and update
- "traefik.http.services.webcam2.loadbalancer.server.port=8080"
- "traefik.http.routers.webcam2.rule=PathPrefix(`/webcam2`)"
- "traefik.http.routers.webcam2.entrypoints=web"
- "traefik.http.middlewares.webcam2.stripprefix.prefixes=/webcam2"
- "traefik.http.routers.webcam2.middlewares=webcam2"
```
### Building Docker images locally

View File

@@ -17,13 +17,15 @@ services:
devices:
- /dev/ttymxc3:/dev/ttymxc3
ustreamer:
webcam:
<<: *ustreamer-svc
container_name: ustreamer
container_name: webcam
devices:
- /dev/video0:/dev/webcam
labels:
- "traefik.enable=true"
- "traefik.http.services.ustreamer.loadbalancer.server.port=8080"
- "traefik.http.routers.ustreamer.rule=PathPrefix(`/stream`)"
- "traefik.http.routers.ustreamer.entrypoints=web"
- "traefik.http.services.webcam.loadbalancer.server.port=8080"
- "traefik.http.routers.webcam.rule=PathPrefix(`/webcam`)"
- "traefik.http.routers.webcam.entrypoints=web"
- "traefik.http.middlewares.webcam.stripprefix.prefixes=/webcam"
- "traefik.http.routers.webcam.middlewares=webcam"