Per gestire da remoto lo streaming della radio
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
blallo fba86f8648
Readmes
3 weeks ago
cmd Implement Runnable for docker containers 3 weeks ago
devloop Adding makefile local dev niceties 3 weeks ago
ui Refactor ui: drop redux in favor of state local to components 3 weeks ago
.gitignore Init 2 months ago
Dockerfile Refactor docker infra 3 weeks ago
Makefile Adding makefile local dev niceties 3 weeks ago
README.en.md Readmes 3 weeks ago
README.md Readmes 3 weeks ago
docker-compose.yml Refactor docker infra 3 weeks ago
docker.go Switch to container pause/unpause 3 weeks ago
go.mod Implement Runnable for docker containers 3 weeks ago
go.sum Implement Runnable for docker containers 3 weeks ago
lines_ring.go Init 2 months ago
lines_ring_test.go Init 2 months ago
process.go Refactor execution logic as an inteface 3 weeks ago
radio.go Refactor execution logic as an inteface 3 weeks ago
runnable.go Refactor execution logic as an inteface 3 weeks ago
systemd.go Fix systemd logs retrieval 3 weeks ago

README.en.md

Broadcast

Control the execution of a program via web interface.

Description

broadcast is a simple web application to control another executable program. There are 3 methods to do so:

  1. directly, specifying the binary absolute path and all command line options
  2. via a systemd unit, specifying the -systemd flag (and optionally the -systemd-as-user flag, to signal that the unit is a user one)
  3. controlling an already existing docker container (note: it has to be already exinsting -although it can be paused- and have a name with the --name option)

The program exposes a web interface, defaulting on 0.0.0.0:8080, that can be specified using the -addr parameter.

Examples

For the sake of testing, this repository includes a simple program that prints a string every second: echo. We will use it in the following examples.

1. directly

broadcast /path/to/echo

2. systemd unit

Assuming an already existing unit named echo.service

broadcast -systemd -systemd-as-user echo.service

3. docker container

Assuming there already exists a docker container, started for example with

docker run --name echo --rm -ti echo
broadcast -docker echo

Develop

The project includes a Makefile to ease some tasks. It is possible to begin a developing session, first building the needed images with

make dev-build

It is then possible to launch a docker compose stack with

make dev

In order to build the artifacts (output to bin/) (note that libsystemd-dev is a prerequisite)

make build

License

GPL-v3 or following.