Per gestire da remoto lo streaming della radio
 
 
 
 
 
 
Go to file
blallo fba86f8648
Readmes
2023-03-14 23:47:23 +01:00
cmd Implement Runnable for docker containers 2023-03-14 18:38:56 +01:00
devloop Adding makefile local dev niceties 2023-03-13 01:09:29 +01:00
ui Refactor ui: drop redux in favor of state local to components 2023-03-14 23:19:32 +01:00
.gitignore Init 2023-02-13 23:49:45 +01:00
Dockerfile Refactor docker infra 2023-03-14 18:35:30 +01:00
Makefile Adding makefile local dev niceties 2023-03-13 01:09:29 +01:00
README.en.md Readmes 2023-03-14 23:47:23 +01:00
README.md Readmes 2023-03-14 23:47:23 +01:00
docker-compose.yml Refactor docker infra 2023-03-14 18:35:30 +01:00
docker.go Switch to container pause/unpause 2023-03-14 18:49:58 +01:00
go.mod Implement Runnable for docker containers 2023-03-14 18:38:56 +01:00
go.sum Implement Runnable for docker containers 2023-03-14 18:38:56 +01:00
lines_ring.go Init 2023-02-13 23:49:45 +01:00
lines_ring_test.go Init 2023-02-13 23:49:45 +01:00
process.go Refactor execution logic as an inteface 2023-03-13 01:08:13 +01:00
radio.go Refactor execution logic as an inteface 2023-03-13 01:08:13 +01:00
runnable.go Refactor execution logic as an inteface 2023-03-13 01:08:13 +01:00
systemd.go Fix systemd logs retrieval 2023-03-14 00:02:39 +01:00

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.