diff --git a/README.md b/README.md index 3690d2d..4639716 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ See the `defaults/main.yml` file for details. - `libretime_public_url` defines the public url used to access Libretime. This variable **MUST** be updated. - `libretime_api_key` define the api key. This variable **MUST** be updated. +- `libretime_secret_key` define the secret key. This variable **MUST** be updated. - `libretime_config_template` defines the path to your configuration template file. This variable **SHOULD** be updated. This is used to let you deploy your own configuration file, you can find an example in `templates/libretime/config.yml.j2`. @@ -51,7 +52,8 @@ See the `requirements.yml` file for details. - role: libretime libretime_public_url: https://station.radio.org libretime_listen_port: 8080 - libretime_api_key: a182_your_secret_key_c87f + libretime_api_key: LutEXJfHC1iOdXbVd4LjA3jX0ZVvwBGJCYF6AUVh + libretime_secret_key: h4H2uMLGZoksbzcQECs2nhBwDW16vnWEfPEVao8q libretime_icecast_admin_password: 0fd9ba81394a91cd178514e3c6788052 libretime_icecast_source_password: ee41c264d954b92fce44521e02663d89 libretime_icecast_relay_password: 9702d35f24d77ce8cb2da75ab2298654 diff --git a/defaults/main.yml b/defaults/main.yml index 92eaf5e..8b927c7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,7 +7,7 @@ libretime_public_url: "http://localhost:{{ libretime_listen_port }}/" libretime_api_key: "{{ libretime_legacy_api_key | default('hackme') }}" libretime_user: libretime -libretime_listen_port: 80 +libretime_listen_port: 8080 libretime_max_upload_size: 512M libretime_checkout_url: https://github.com/libretime/libretime diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index b6ed3a7..c855482 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -25,6 +25,8 @@ provisioner: instance1: libretime_public_url: http://localhost:{{ libretime_listen_port }}/ libretime_listen_port: 9001 + libretime_api_key: hackme + libretime_secret_key: hackme libretime_playout_pip_extras: [sentry] libretime_playout_systemd_override: | [Service] @@ -32,6 +34,8 @@ provisioner: instance2: libretime_public_url: http://localhost:{{ libretime_listen_port }}/ libretime_listen_port: 9002 + libretime_api_key: hackme + libretime_secret_key: hackme verifier: name: testinfra diff --git a/templates/libretime/config.yml.j2 b/templates/libretime/config.yml.j2 index 80e90d9..856f51b 100644 --- a/templates/libretime/config.yml.j2 +++ b/templates/libretime/config.yml.j2 @@ -7,6 +7,9 @@ general: # The internal API authentication key. # > this field is REQUIRED api_key: {{ libretime_api_key }} + # The Django API secret key. + # > this field is REQUIRED + secret_key: {{ libretime_secret_key }} # List of origins allowed to access resources on the server, the public url # origin is automatically included. @@ -103,6 +106,13 @@ liquidsoap: # > default is ["0.0.0.0"] harbor_listen_address: ["0.0.0.0"] + # Input harbor tls certificate path. + harbor_ssl_certificate: + # Input harbor tls certificate private key path. + harbor_ssl_private_key: + # Input harbor tls certificate password. + harbor_ssl_password: + stream: # Inputs sources. inputs: @@ -117,6 +127,9 @@ stream: # Listen port for the main harbor input. # > default is 8001 port: 8001 + # Whether the input harbor is secured with the tls certificate. + # > default is false + secure: false # Show harbor input. show: @@ -129,6 +142,9 @@ stream: # Listen port for the show harbor input. # > default is 8002 port: 8002 + # Whether the input harbor is secured with the tls certificate. + # > default is false + secure: false # Output streams. outputs: @@ -216,6 +232,10 @@ stream: # Icecast stream genre. genre: various + # Whether the stream should be used for mobile devices. + # > default is false + mobile: false + # Shoutcast output streams. # > max items is 1 shoutcast: @@ -261,6 +281,10 @@ stream: # Shoutcast stream genre. genre: various + # Whether the stream should be used for mobile devices. + # > default is false + mobile: false + # System outputs. # > max items is 1 system: @@ -269,5 +293,9 @@ stream: enabled: false # System output kind. # > must be one of (alsa, ao, oss, portaudio, pulseaudio) - # > default is alsa - kind: alsa + # > default is pulseaudio + kind: pulseaudio + + # System output device. + # > only available for kind=(alsa, pulseaudio) + device: diff --git a/templates/systemd/libretime-api.service.j2 b/templates/systemd/libretime-api.service.j2 index 97f5968..d77812a 100644 --- a/templates/systemd/libretime-api.service.j2 +++ b/templates/systemd/libretime-api.service.j2 @@ -26,7 +26,7 @@ Type=notify KillMode=mixed ExecStart={{ libretime_venv_dir }}/bin/gunicorn \ --workers 4 \ - --worker-class uvicorn.workers.UvicornWorker \ + --worker-class libretime_api.gunicorn.Worker \ --log-file - \ --bind unix:/run/libretime-api.sock \ libretime_api.asgi