From da4f319f61de6803b48be79fe84e010b4aa3d103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sat, 2 Dec 2023 14:27:43 +0100 Subject: [PATCH] Update README --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index 4b919dc..e9ea169 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,39 @@ # ministream +Small streaming service utilizing WebRTC and WHIP, written in go. + +## Deployment + +Create a `ministream.service` like this: + +``` +# /etc/systemd/system/ministream.service +[Unit] +Description=Ministream Container +After=docker.service +Requires=docker.service + +[Service] +TimeoutStartSec=0 +Restart=always +ExecStartPre=-/usr/bin/docker pull git.t-juice.club/torjus/ministream:latest +ExecStartPre=-/usr/bin/docker stop ministream +ExecStartPre=-/usr/bin/docker rm ministream +ExecStart=/usr/bin/docker run -p 50000-50050:50000-50050/udp \ + -p 8080:8080 \ + --name ministream git.t-juice.club/torjus/ministream:latest + +[Install] +WantedBy=multi-user.target +``` + +After running the service, it should be accessible on `http://HOSTNAME:8080` + + +## Build and run using Docker + +```console +$ docker build -t ministream:latest . +... +$ docker run -p 50000-50050:50000-50050/udp -p 8080:8080 ministream:latest +```