From a2d3bccf07b7f9c1f27d313962b40da2ad56fd65 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Wed, 15 May 2024 21:10:54 +0200 Subject: [PATCH] Improve docker-compose setup to include owncast --- README.md | 16 +++++++++++++++- docker/docker-compose.yml | 36 ++++++++++++++++++++++++++---------- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d92587c..d993d07 100644 --- a/README.md +++ b/README.md @@ -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 | @@ -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 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 8837566..8bd5c82 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -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" @@ -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: