feat(playout): allow liquidsoap listen address configuration

This commit is contained in:
jo 2022-08-18 12:11:27 +02:00 committed by Kyle Robbertze
parent c8cb100645
commit 37b8b17ed3
6 changed files with 56 additions and 3 deletions

View File

@ -152,6 +152,12 @@ libretime-worker
The `playout` section configure anything related to the playout service.
:::caution
When changing the `playout.liquidsoap_*` entries, make sure to also configure the `liquidsoap.server_listen_*` entries accordingly.
:::
```yml
playout:
# Liquidsoap connection host.
@ -185,6 +191,36 @@ In order to apply the changes made in this section, please restart the following
libretime-playout
```
## Liquidsoap
The `liquidsoap` section configure anything related to the liquidsoap service.
:::caution
When changing the `liquidsoap.server_listen_*` entries, make sure to also configure the `playout.liquidsoap_*` entries accordingly.
:::
```yml
liquidsoap:
# Liquidsoap server listen address.
# > default is 127.0.0.1
server_listen_address: "127.0.0.1"
# Liquidsoap server listen port.
# > default is 1234
server_listen_port: 1234
# Input harbor listen address.
# > default is ["0.0.0.0"]
harbor_listen_address: ["0.0.0.0"]
```
In order to apply the changes made in this section, please restart the following services:
```
libretime-liquidsoap
```
## LDAP
The `ldap` section provide additional configuration for the authentication mechanism defined in `general.auth`, please see the [custom authentication documentation](../custom-authentication.md) for more details.

View File

@ -93,6 +93,11 @@ class Schema implements ConfigurationInterface
/**/->ignoreExtraKeys()
->end()
// Liquidsoap schema
->arrayNode('liquidsoap')
/**/->ignoreExtraKeys()
->end()
// Stream schema
->arrayNode('stream')->ignoreExtraKeys()->addDefaultsIfNotSet()->children()

View File

@ -1,4 +1,5 @@
from pathlib import Path
from typing import List
from libretime_shared.config import (
BaseConfig,
@ -27,8 +28,16 @@ class PlayoutConfig(BaseModel):
record_sample_size: int = 16
class LiquidsoapConfig(BaseModel):
server_listen_address: str = "127.0.0.1"
server_listen_port: int = 1234
harbor_listen_address: List[str] = ["0.0.0.0"]
class Config(BaseConfig):
general: GeneralConfig
rabbitmq: RabbitMQConfig = RabbitMQConfig()
playout: PlayoutConfig = PlayoutConfig()
liquidsoap: LiquidsoapConfig = LiquidsoapConfig()
stream: StreamConfig = StreamConfig()

View File

@ -44,12 +44,13 @@ set("log.file", false)
{%- endif %}
set("server.telnet", true)
set("server.telnet.port", 1234)
set("server.telnet.bind_addr", "{{ config.liquidsoap.server_listen_address }}")
set("server.telnet.port", {{ config.liquidsoap.server_listen_port }})
{% if version >= (1, 3, 3) -%}
set("harbor.bind_addrs", ["0.0.0.0"])
set("harbor.bind_addrs", ["{{ config.liquidsoap.harbor_listen_address | join('", "') }}"])
{%- else -%}
set("harbor.bind_addr", "0.0.0.0")
set("harbor.bind_addr", "{{ config.liquidsoap.harbor_listen_address[0] }}")
{%- endif %}
station_name = ref "{{ info.station_name }}"

View File

@ -92,6 +92,7 @@ auth_path = "/fake/liquidsoap_auth.py"
set("log.file.path", "/var/log/radio.log")
set("server.telnet", true)
set("server.telnet.bind_addr", "127.0.0.1")
set("server.telnet.port", 1234)
set("harbor.bind_addr", "0.0.0.0")

View File

@ -92,6 +92,7 @@ auth_path = "/fake/liquidsoap_auth.py"
set("log.file.path", "/var/log/radio.log")
set("server.telnet", true)
set("server.telnet.bind_addr", "127.0.0.1")
set("server.telnet.port", 1234)
set("harbor.bind_addrs", ["0.0.0.0"])