Skip to content

Commit

Permalink
Improve docker-compose setup to include owncast
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernauer committed May 15, 2024
1 parent 24a0f21 commit a2d3bcc
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 11 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ The ready to use Docker compose setup contains the Pixelflut server, a Prometheu
Use the following command to start the whole setup

```bash
docker-compose up
cd docker && docker-compose up
```

You should now have access to the following services

| Port | Description |
Expand All @@ -143,6 +144,19 @@ If you visit the Grafana server (user=admin, password=admin) you will have acces

![Grafana screenshot](docs/images/Screenshot_20220210_215752.png)

## Live streaming via Webinterface (owncast)

The docker-compose setup also contains an owncast server, which breakwater pushes an RTMP stream into.
owncast than exposes a Web UI where people can watch the game in a web-browser.
Please note that the stream has a much higer delay compared to VNC and the fmmpeg command used internally consumes much CPU.
Because of this the components are commented out by default, you need to comment them in!

## Live streaming to internet services (e.g. Youtube, Twich)

This should work the same way as streaming to owncast.
Simply uncomment the `breakwater` command and adopt `--rtmp-address` accordingly.
I never used this for a longer time period, so happy about feedback!

# Performance

## Laptop
Expand Down
36 changes: 26 additions & 10 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
version: '3'
services:
pixelflut:
image: sbernauer/breakwater:0.13.0
# build: ..
restart: unless-stopped
image: sbernauer/breakwater
# build: .
entrypoint:
- bash
- -c
- breakwater --width 1280 --height 720
# To also stream to owncast (disabled by default as it consumes lots of CPU)
# Yes we use the default streaming key, I don't know how to change it in owncast
# - echo "Waiting for owncast to be ready" && sleep 5 && breakwater --width 1920 --height 1080 --rtmp-address rtmp://owncast:1935/live/abc123
ports:
- 1234:1234
- 5900:5900
- 9100:9100
- 1234:1234 # Pixelflut
- 5900:5900 # VNC
- 9100:9100 # Metrics

node-exporter:
restart: unless-stopped
image: prom/node-exporter:v1.8.0
restart: unless-stopped
ports:
- 9101:9101
- 9101:9101 # Metrics
pid: host
volumes:
- "/:/host:ro,rslave"
Expand All @@ -28,17 +35,26 @@ services:
- "./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml"
- "prometheus-data:/prometheus"
ports:
- 9090:9090
- 9090:9090 # Web UI

grafana:
restart: unless-stopped
image: grafana/grafana:10.1.10
restart: unless-stopped
volumes:
- "./grafana/provisioning:/etc/grafana/provisioning/"
- "grafana-data:/var/lib/grafana"
ports:
- 3000:3000
- 3000:3000 # Web UI

# owncast:
# image: gabekangas/owncast:0.1.3
# restart: unless-stopped
# volumes:
# - "owncast-data:/app/data"
# ports:
# - 8080:8080 # Web UI

volumes:
grafana-data:
prometheus-data:
owncast-data:

0 comments on commit a2d3bcc

Please sign in to comment.