libretime_container_docker
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| libretime_container_docker [2025/12/10 22:14] – créée Benjamin Labomedia | libretime_container_docker [2026/03/26 20:51] (Version actuelle) – [Installer Libretime via Docker] Benjamin Labomedia | ||
|---|---|---|---|
| Ligne 5: | Ligne 5: | ||
| ===== Installer Libretime via Docker ===== | ===== Installer Libretime via Docker ===== | ||
| Tests partiellement réalisés sur Debian 13 et Ubuntu 24.04 | Tests partiellement réalisés sur Debian 13 et Ubuntu 24.04 | ||
| - | * Doc install Docker https:// | + | |
| + | Commencer par installer Docker : Doc install Docker https:// | ||
| Création d'une utilisatrice dédiée | Création d'une utilisatrice dédiée | ||
| adduser libretimedocker | adduser libretimedocker | ||
| Changer d' | Changer d' | ||
| sudo su - libretimedocker | sudo su - libretimedocker | ||
| - | * Doc install Libretime https:// | ||
| + | Installer ensuite Libretime en tant qu' | ||
| + | |||
| + | Il faut donc adapter les fichiers config.yml et docker-compose.yml puis ... | ||
| + | |||
| + | Ne pas oublier d' | ||
| + | |||
| + | docker compose run --rm api libretime-api migrate | ||
| + | |||
| + | Ensuite pour démarrer le container, toujours à partir du répertoire d' | ||
| + | docker compose up -d | ||
| + | check si ça marche : | ||
| + | docker compose ps | ||
| + | docker compose logs -f | ||
| + | éteindre et virer les processus orphelins (les pauvres) | ||
| + | docker-compose down --remove-orphans | ||
| + | |||
| + | ===== Ressources complémentaires - troubleshouting ===== | ||
| + | * La documentation Libretime https:// | ||
| + | * Le forum Libretime https:// | ||
| + | * Problème de lecture des flux https comme webstream dans libretime https:// | ||
| + | ===== Libretime Docker docker-compose.yml ===== | ||
| + | <file yml docker-compose.yml> | ||
| + | services: | ||
| + | postgres: | ||
| + | image: postgres:15 | ||
| + | # pour assurer un démarrage au boot, ajouter cette ligne pour chaque service : | ||
| + | restart: always | ||
| + | volumes: | ||
| + | - postgres_data:/ | ||
| + | environment: | ||
| + | POSTGRES_USER: | ||
| + | POSTGRES_PASSWORD: | ||
| + | healthcheck: | ||
| + | test: pg_isready -U libretime | ||
| + | |||
| + | rabbitmq: | ||
| + | image: rabbitmq: | ||
| + | restart: always | ||
| + | environment: | ||
| + | RABBITMQ_DEFAULT_VHOST: | ||
| + | RABBITMQ_DEFAULT_USER: | ||
| + | RABBITMQ_DEFAULT_PASS: | ||
| + | healthcheck: | ||
| + | test: nc -z 127.0.0.1 5672 | ||
| + | |||
| + | playout: | ||
| + | image: ghcr.io/ | ||
| + | restart: always | ||
| + | init: true | ||
| + | ulimits: | ||
| + | nofile: 1024 | ||
| + | depends_on: | ||
| + | - rabbitmq | ||
| + | volumes: | ||
| + | - ${LIBRETIME_CONFIG_FILEPATH: | ||
| + | - libretime_playout:/ | ||
| + | environment: | ||
| + | LIBRETIME_GENERAL_PUBLIC_URL: | ||
| + | |||
| + | liquidsoap: | ||
| + | image: ghcr.io/ | ||
| + | restart: always | ||
| + | command: / | ||
| + | init: true | ||
| + | ulimits: | ||
| + | nofile: 1024 | ||
| + | ports: | ||
| + | # à changer si plusieurs docker Libretime sur le même serveur | ||
| + | - 8001:8001 | ||
| + | - 8002:8002 | ||
| + | depends_on: | ||
| + | - rabbitmq | ||
| + | volumes: | ||
| + | - ${LIBRETIME_CONFIG_FILEPATH: | ||
| + | - libretime_playout:/ | ||
| + | environment: | ||
| + | LIBRETIME_GENERAL_PUBLIC_URL: | ||
| + | |||
| + | analyzer: | ||
| + | image: ghcr.io/ | ||
| + | restart: always | ||
| + | init: true | ||
| + | ulimits: | ||
| + | nofile: 1024 | ||
| + | depends_on: | ||
| + | - rabbitmq | ||
| + | volumes: | ||
| + | - ${LIBRETIME_CONFIG_FILEPATH: | ||
| + | - libretime_storage:/ | ||
| + | environment: | ||
| + | LIBRETIME_GENERAL_PUBLIC_URL: | ||
| + | |||
| + | worker: | ||
| + | image: ghcr.io/ | ||
| + | restart: always | ||
| + | init: true | ||
| + | ulimits: | ||
| + | nofile: 1024 | ||
| + | depends_on: | ||
| + | - rabbitmq | ||
| + | volumes: | ||
| + | - ${LIBRETIME_CONFIG_FILEPATH: | ||
| + | environment: | ||
| + | LIBRETIME_GENERAL_PUBLIC_URL: | ||
| + | |||
| + | api: | ||
| + | image: ghcr.io/ | ||
| + | restart: always | ||
| + | init: true | ||
| + | ulimits: | ||
| + | nofile: 1024 | ||
| + | depends_on: | ||
| + | - postgres | ||
| + | - rabbitmq | ||
| + | volumes: | ||
| + | - ${LIBRETIME_CONFIG_FILEPATH: | ||
| + | - libretime_storage:/ | ||
| + | |||
| + | legacy: | ||
| + | image: ghcr.io/ | ||
| + | restart: always | ||
| + | init: true | ||
| + | ulimits: | ||
| + | nofile: 1024 | ||
| + | depends_on: | ||
| + | - postgres | ||
| + | - rabbitmq | ||
| + | volumes: | ||
| + | - ${LIBRETIME_CONFIG_FILEPATH: | ||
| + | - libretime_storage:/ | ||
| + | |||
| + | nginx: | ||
| + | image: ghcr.io/ | ||
| + | restart: always | ||
| + | ports: | ||
| + | - 127.0.0.1: | ||
| + | #pour faire en sorte que le nginx intégré au docker n' | ||
| + | depends_on: | ||
| + | - legacy | ||
| + | volumes: | ||
| + | - libretime_storage:/ | ||
| + | |||
| + | #pour désactiver le icecast intégré au docker et utiliser un icecast externe, commenter les lignes ci-dessous | ||
| + | # icecast: | ||
| + | # image: ghcr.io/ | ||
| + | # ports: | ||
| + | # - 8000:8000 | ||
| + | # environment: | ||
| + | # ICECAST_SOURCE_PASSWORD: | ||
| + | # ICECAST_ADMIN_PASSWORD: | ||
| + | # ICECAST_RELAY_PASSWORD: | ||
| + | |||
| + | volumes: | ||
| + | postgres_data: | ||
| + | libretime_storage: | ||
| + | libretime_playout: | ||
| + | |||
| + | </ | ||
| + | ===== Libretime Docker config.yml ===== | ||
| + | <file yml config.yml> | ||
| + | |||
| + | # See https:// | ||
| + | |||
| + | general: | ||
| + | # The public url. | ||
| + | # > this field is REQUIRED | ||
| + | public_url: https:// | ||
| + | # The internal API authentication key. | ||
| + | # > this field is REQUIRED | ||
| + | api_key: radio.radiocampus.org.APIKEY.clefaleatoireanventer | ||
| + | # The Django API secret key. | ||
| + | # > this field is REQUIRED | ||
| + | secret_key: radio.radiocampus.org.SECRETKEY.clefaleatoireanventer | ||
| + | |||
| + | # List of origins allowed to access resources on the server, the public url | ||
| + | # origin is automatically included. | ||
| + | # > default is [] | ||
| + | # | ||
| + | allowed_cors_origins: | ||
| + | |||
| + | # The server timezone, should be a lookup key in the IANA time zone database, | ||
| + | # for example Europe/ | ||
| + | # > default is UTC | ||
| + | timezone: Europe/ | ||
| + | |||
| + | # How many hours ahead Playout should cache scheduled media files. | ||
| + | # > default is 1 | ||
| + | cache_ahead_hours: | ||
| + | |||
| + | # Authentication adaptor to use for the legacy service, specify a class like | ||
| + | # LibreTime_Auth_Adaptor_FreeIpa to replace the built-in adaptor. | ||
| + | # > default is local | ||
| + | auth: local | ||
| + | |||
| + | storage: | ||
| + | # Path of the storage directory. Make sure to update the Nginx configuration after | ||
| + | # updating the storage path. | ||
| + | # > default is / | ||
| + | path: / | ||
| + | |||
| + | database: | ||
| + | # The hostname of the PostgreSQL server. | ||
| + | # > default is localhost | ||
| + | host: postgres | ||
| + | # The port of the PostgreSQL server. | ||
| + | # > default is 5432 | ||
| + | port: 5432 | ||
| + | # The name of the PostgreSQL database. | ||
| + | # > default is libretime | ||
| + | name: libretime | ||
| + | # The username of the PostgreSQL user. | ||
| + | # > default is libretime | ||
| + | user: libretime | ||
| + | # The password of the PostgreSQL user. | ||
| + | # > default is libretime | ||
| + | password: passwordgénéréautomatiquelorsdelaprocedured' | ||
| + | |||
| + | rabbitmq: | ||
| + | # The hostname of the RabbitMQ server. | ||
| + | # > default is localhost | ||
| + | host: rabbitmq | ||
| + | # The port of the RabbitMQ server. | ||
| + | # > default is 5672 | ||
| + | port: 5672 | ||
| + | # The virtual host of RabbitMQ server. | ||
| + | # > default is /libretime | ||
| + | vhost: /libretime | ||
| + | # The username of the RabbitMQ user. | ||
| + | # > default is libretime | ||
| + | user: libretime | ||
| + | # The password of the RabbitMQ user. | ||
| + | # > default is libretime | ||
| + | password: passwordgénéréautomatiquelorsdelaprocedured' | ||
| + | |||
| + | email: | ||
| + | # Sender email address to use when sending emails. | ||
| + | # > default is no-reply@libretime.org | ||
| + | from_address: | ||
| + | |||
| + | # The hostname of the SMTP server. | ||
| + | # > default is localhost | ||
| + | host: localhost | ||
| + | # The port of the SMTP server. | ||
| + | # > default is 25 | ||
| + | port: 25 | ||
| + | # Whether to use an insecure connection, an SSL/TLS (implicit) connection (generally | ||
| + | # on port 465) or a STARTTLS (explicit) connection (generally on port 587) when | ||
| + | # talking to the SMTP server. | ||
| + | # > must be one of (ssl/tls, starttls) | ||
| + | encryption: | ||
| + | # The username to use for the SMTP server. | ||
| + | # > default is "" | ||
| + | user: "" | ||
| + | # The password to use for the SMTP server. | ||
| + | # > default is "" | ||
| + | password: "" | ||
| + | # Timeout in seconds for blocking operations like the connection attempt. | ||
| + | timeout: | ||
| + | # The path to a PEM-formatted certificate chain file to use for the connection. | ||
| + | cert_file: | ||
| + | # The path to a PEM-formatted private key file to use for the connection. | ||
| + | key_file: | ||
| + | |||
| + | playout: | ||
| + | # Liquidsoap connection host. | ||
| + | # > default is localhost | ||
| + | liquidsoap_host: | ||
| + | # Liquidsoap connection port. | ||
| + | # > default is 1234 | ||
| + | liquidsoap_port: | ||
| + | |||
| + | # The format for recordings. | ||
| + | # > must be one of (ogg, mp3) | ||
| + | # > default is ogg | ||
| + | record_file_format: | ||
| + | # The bitrate for recordings. | ||
| + | # > default is 256 | ||
| + | record_bitrate: | ||
| + | # The samplerate for recordings. | ||
| + | # > default is 44100 | ||
| + | record_samplerate: | ||
| + | # The number of channels for recordings. | ||
| + | # > default is 2 | ||
| + | record_channels: | ||
| + | # The sample size for recordings. | ||
| + | # > default is 16 | ||
| + | record_sample_size: | ||
| + | |||
| + | liquidsoap: | ||
| + | # Liquidsoap server listen address. | ||
| + | # > default is 127.0.0.1 | ||
| + | # à mettre en 0.0.0.0 pour que liquidsoap écoute l' | ||
| + | server_listen_address: | ||
| + | # Liquidsoap server listen port. | ||
| + | # > default is 1234 | ||
| + | server_listen_port: | ||
| + | |||
| + | # Input harbor listen address. | ||
| + | # > default is [" | ||
| + | # à mettre en 0.0.0.0 pour que liquidsoap écoute l' | ||
| + | # à mettre en 127.0.0.1 pour quels les 8001 et 8002 ne soient pas visibles de l' | ||
| + | harbor_listen_address: | ||
| + | |||
| + | # 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: | ||
| + | # Main harbor input. | ||
| + | main: | ||
| + | # Harbor input public url. If not defined, the value will be generated from | ||
| + | # the [general.public_url] hostname, the input port and mount. | ||
| + | public_url: https:// | ||
| + | # Mount point for the main harbor input. | ||
| + | # > default is main | ||
| + | mount: main | ||
| + | # 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: | ||
| + | # Harbor input public url. If not defined, the value will be generated from | ||
| + | # the [general.public_url] hostname, the input port and mount. | ||
| + | public_url: https:// | ||
| + | # Mount point for the show harbor input. | ||
| + | # > default is show | ||
| + | mount: show | ||
| + | # 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: | ||
| + | # Default icecast output | ||
| + | # This can be reused to define multiple outputs without duplicating data | ||
| + | .default_icecast_output: | ||
| + | host: *.*******.org | ||
| + | port: 8000 | ||
| + | source_password: | ||
| + | admin_password: | ||
| + | name: Radio * ! | ||
| + | description: | ||
| + | website: https:// | ||
| + | genre: various | ||
| + | |||
| + | # Icecast output streams. | ||
| + | # > max items is 3 | ||
| + | icecast: | ||
| + | # The default Icecast output stream | ||
| + | - <<: *default_icecast_output | ||
| + | enabled: true | ||
| + | public_url: https:// | ||
| + | mount: radio*****.ogg | ||
| + | audio: | ||
| + | format: ogg | ||
| + | bitrate: 256 | ||
| + | |||
| + | # You can define extra outputs by reusing the default output using a yaml anchor | ||
| + | - <<: *default_icecast_output | ||
| + | enabled: true | ||
| + | public_url: https:// | ||
| + | mount: radio*****.mp3 | ||
| + | audio: | ||
| + | format: mp3 | ||
| + | bitrate: 320 | ||
| + | |||
| + | - # Whether the output is enabled. | ||
| + | # > default is false | ||
| + | enabled: false | ||
| + | # Output public url, If not defined, the value will be generated from | ||
| + | # the [general.public_url] hostname, the output port and mount. | ||
| + | public_url: | ||
| + | # Icecast server host. | ||
| + | # > default is localhost | ||
| + | host: localhost | ||
| + | # Icecast server port. | ||
| + | # > default is 8000 | ||
| + | port: 8000 | ||
| + | # Icecast server mount point. | ||
| + | # > this field is REQUIRED | ||
| + | mount: main | ||
| + | # Icecast source user. | ||
| + | # > default is source | ||
| + | source_user: | ||
| + | # Icecast source password. | ||
| + | # > this field is REQUIRED | ||
| + | source_password: | ||
| + | # Icecast admin user. | ||
| + | # > default is admin | ||
| + | admin_user: admin | ||
| + | # Icecast admin password. If not defined, statistics will not be collected. | ||
| + | admin_password: | ||
| + | |||
| + | # Icecast output audio. | ||
| + | audio: | ||
| + | # Icecast output audio format. | ||
| + | # > must be one of (aac, mp3, ogg, opus) | ||
| + | # > this field is REQUIRED | ||
| + | format: ogg | ||
| + | # Icecast output audio bitrate. | ||
| + | # > must be one of (32, 48, 64, 96, 128, 160, 192, 224, 256, 320) | ||
| + | # > this field is REQUIRED | ||
| + | bitrate: 256 | ||
| + | |||
| + | # format=ogg only field: Embed metadata (track title, artist, and show name) | ||
| + | # in the output stream. Some bugged players will disconnect from the stream | ||
| + | # after every songs when playing ogg streams that have metadata information | ||
| + | # enabled. | ||
| + | # > default is false | ||
| + | enable_metadata: | ||
| + | |||
| + | # Icecast stream name. | ||
| + | name: LibreTime! | ||
| + | # Icecast stream description. | ||
| + | description: | ||
| + | # Icecast stream website. | ||
| + | website: https:// | ||
| + | # 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: | ||
| + | - # Whether the output is enabled. | ||
| + | # > default is false | ||
| + | enabled: false | ||
| + | # Output public url. If not defined, the value will be generated from | ||
| + | # the [general.public_url] hostname and the output port. | ||
| + | public_url: | ||
| + | # Shoutcast server host. | ||
| + | # > default is localhost | ||
| + | host: localhost | ||
| + | # Shoutcast server port. | ||
| + | # > default is 8000 | ||
| + | port: 8000 | ||
| + | # Shoutcast source user. | ||
| + | # > default is source | ||
| + | source_user: | ||
| + | # Shoutcast source password. | ||
| + | # > this field is REQUIRED | ||
| + | source_password: | ||
| + | # Shoutcast admin user. | ||
| + | # > default is admin | ||
| + | admin_user: admin | ||
| + | # Shoutcast admin password. If not defined, statistics will not be collected. | ||
| + | admin_password: | ||
| + | |||
| + | # Shoutcast output audio. | ||
| + | audio: | ||
| + | # Shoutcast output audio format. | ||
| + | # > must be one of (aac, mp3) | ||
| + | # > this field is REQUIRED | ||
| + | format: mp3 | ||
| + | # Shoutcast output audio bitrate. | ||
| + | # > must be one of (32, 48, 64, 96, 128, 160, 192, 224, 256, 320) | ||
| + | # > this field is REQUIRED | ||
| + | bitrate: 256 | ||
| + | |||
| + | # Shoutcast stream name. | ||
| + | name: LibreTime! | ||
| + | # Shoutcast stream website. | ||
| + | website: https:// | ||
| + | # 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: | ||
| + | - # Whether the output is enabled. | ||
| + | # > default is false | ||
| + | enabled: false | ||
| + | # System output kind. | ||
| + | # > must be one of (alsa, ao, oss, portaudio, pulseaudio) | ||
| + | # > default is pulseaudio | ||
| + | kind: pulseaudio | ||
| + | |||
| + | # System output device. | ||
| + | # > only available for kind=(alsa, pulseaudio) | ||
| + | device: | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Proxy Apache vhosts ===== | ||
| + | <file php radio.org.conf> | ||
| + | |||
| + | ## Libretime - docker-container | ||
| + | < | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | ProxyPreserveHost | ||
| + | ProxyRequests | ||
| + | |||
| + | |||
| + | < | ||
| + | Order deny,allow | ||
| + | Allow from all | ||
| + | </ | ||
| + | |||
| + | RewriteEngine on | ||
| + | RewriteCond %{SERVER_NAME} =****.***********.org | ||
| + | RewriteRule ^ https:// | ||
| + | </ | ||
| + | |||
| + | <file php radio.org-le-ssl.conf > | ||
| + | < | ||
| + | < | ||
| + | |||
| + | ServerAdmin **@riseup.net | ||
| + | ServerName ****.***********.org | ||
| + | |||
| + | | ||
| + | | ||
| + | |||
| + | ProxyPreserveHost On | ||
| + | ProxyRequests Off | ||
| + | |||
| + | < | ||
| + | ProxyPass | ||
| + | ProxyPassReverse | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | Order deny,allow | ||
| + | Allow from all | ||
| + | </ | ||
| + | |||
| + | SSLEngine on | ||
| + | SSLProxyEngine On | ||
| + | SSLProxyVerify none | ||
| + | SSLProxyCheckPeerCN off | ||
| + | SSLProxyCheckPeerName off | ||
| + | SSLProxyCheckPeerExpire off | ||
| + | |||
| + | SSLCertificateFile / | ||
| + | SSLCertificateKeyFile / | ||
| + | Include / | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
libretime_container_docker.1765404841.txt.gz · Dernière modification : de Benjamin Labomedia
