Outils pour utilisateurs

Outils du site


libretime_container_docker

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
libretime_container_docker [2025/12/18 21:55] – [Installer Libretime via Docker] Benjamin Labomedialibretime_container_docker [2026/03/26 20:51] (Version actuelle) – [Installer Libretime via Docker] Benjamin Labomedia
Ligne 6: Ligne 6:
 Tests partiellement réalisés sur Debian 13 et Ubuntu 24.04 Tests partiellement réalisés sur Debian 13 et Ubuntu 24.04
  
-Commencer pa installer Docker : Doc install Docker https://docs.docker.com/engine/install+Commencer par installer Docker : Doc install Docker https://docs.docker.com/engine/install
  
 Création d'une utilisatrice dédiée Création d'une utilisatrice dédiée
Ligne 13: Ligne 13:
   sudo su - libretimedocker   sudo su - libretimedocker
  
-Installer ensuite Libretime en tant qu'utilisatrice libretimedocker : Doc install Libretime https://libretime.org/docs/admin-manual/install/install-using-docker/+Installer ensuite Libretime en tant qu'utilisatrice libretimedocker : [[https://libretime.org/docs/admin-manual/install/install-using-docker/|Doc install Libretime docker]] 
 + 
 +Il faut donc adapter les fichiers config.yml et docker-compose.yml puis ...
  
 Ne pas oublier d'initier la base de données depuis le répertoire d'install !  Ne pas oublier d'initier la base de données depuis le répertoire d'install ! 
  
   docker compose run --rm api libretime-api migrate   docker compose run --rm api libretime-api migrate
-  + 
 +Ensuite pour démarrer le container, toujours à partir du répertoire d'install : 
 +  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://libretime.org/docs/ 
 +  * Le forum Libretime https://discourse.libretime.org/ 
 +  * Problème de lecture des flux https comme webstream dans libretime https://github.com/libretime/libretime/issues/2938 et https://github.com/LibreTime/libretime/issues/1068 
 +===== 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:/var/lib/postgresql/data 
 +    environment: 
 +      POSTGRES_USER: ${POSTGRES_USER:-libretime} 
 +      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-libretime} # Change me ! 
 +    healthcheck: 
 +      test: pg_isready -U libretime 
 + 
 +  rabbitmq: 
 +    image: rabbitmq:3.13-alpine 
 +    restart: always 
 +    environment: 
 +      RABBITMQ_DEFAULT_VHOST: ${RABBITMQ_DEFAULT_VHOST:-/libretime} 
 +      RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-libretime} 
 +      RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-libretime} # Change me ! 
 +    healthcheck: 
 +      test: nc -z 127.0.0.1 5672 
 + 
 +  playout: 
 +    image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-latest} 
 +    restart: always 
 +    init: true 
 +    ulimits: 
 +      nofile: 1024 
 +    depends_on: 
 +      - rabbitmq 
 +    volumes: 
 +      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro 
 +      - libretime_playout:/app 
 +    environment: 
 +      LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080 
 + 
 +  liquidsoap: 
 +    image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-latest} 
 +    restart: always 
 +    command: /usr/local/bin/libretime-liquidsoap 
 +    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:-./config.yml}:/etc/libretime/config.yml:ro 
 +      - libretime_playout:/app 
 +    environment: 
 +      LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080 
 + 
 +  analyzer: 
 +    image: ghcr.io/libretime/libretime-analyzer:${LIBRETIME_VERSION:-latest} 
 +    restart: always 
 +    init: true 
 +    ulimits: 
 +      nofile: 1024 
 +    depends_on: 
 +      - rabbitmq 
 +    volumes: 
 +      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro 
 +      - libretime_storage:/srv/libretime 
 +    environment: 
 +      LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080 
 + 
 +  worker: 
 +    image: ghcr.io/libretime/libretime-worker:${LIBRETIME_VERSION:-latest} 
 +    restart: always 
 +    init: true 
 +    ulimits: 
 +      nofile: 1024 
 +    depends_on: 
 +      - rabbitmq 
 +    volumes: 
 +      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro 
 +    environment: 
 +      LIBRETIME_GENERAL_PUBLIC_URL: http://nginx:8080 
 + 
 +  api: 
 +    image: ghcr.io/libretime/libretime-api:${LIBRETIME_VERSION:-latest} 
 +    restart: always 
 +    init: true 
 +    ulimits: 
 +      nofile: 1024 
 +    depends_on: 
 +      - postgres 
 +      - rabbitmq 
 +    volumes: 
 +      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro 
 +      - libretime_storage:/srv/libretime 
 + 
 +  legacy: 
 +    image: ghcr.io/libretime/libretime-legacy:${LIBRETIME_VERSION:-latest} 
 +    restart: always 
 +    init: true 
 +    ulimits: 
 +      nofile: 1024 
 +    depends_on: 
 +      - postgres 
 +      - rabbitmq 
 +    volumes: 
 +      - ${LIBRETIME_CONFIG_FILEPATH:-./config.yml}:/etc/libretime/config.yml:ro 
 +      - libretime_storage:/srv/libretime 
 + 
 +  nginx: 
 +    image: ghcr.io/libretime/libretime-nginx:${LIBRETIME_VERSION:-latest} 
 +    restart: always 
 +    ports: 
 +      - 127.0.0.1:8080:8080 
 +#pour faire en sorte que le nginx intégré au docker n'écoute qu'en local (possible aussi de changer le 8080:8080 par 8081:8080 pour faire cohabiter plusieurs instances sur le même serveur via différent proxy vhost 
 +    depends_on: 
 +      - legacy 
 +    volumes: 
 +      - libretime_storage:/srv/libretime:ro 
 + 
 +#pour désactiver le icecast intégré au docker et utiliser un icecast externe, commenter les lignes ci-dessous 
 +#  icecast: 
 +#    image: ghcr.io/libretime/icecast:2.4.4 
 +#    ports: 
 +#      - 8000:8000 
 +#    environment: 
 +#      ICECAST_SOURCE_PASSWORD: ${ICECAST_SOURCE_PASSWORD:-hackme} # Change me ! 
 +#      ICECAST_ADMIN_PASSWORD: ${ICECAST_ADMIN_PASSWORD:-hackme} # Change me ! 
 +#      ICECAST_RELAY_PASSWORD: ${ICECAST_RELAY_PASSWORD:-hackme} # Change me ! 
 + 
 +volumes: 
 +  postgres_data: {} 
 +  libretime_storage: {} 
 +  libretime_playout: {} 
 + 
 +</file>
 ===== Libretime Docker config.yml ===== ===== Libretime Docker config.yml =====
 <file yml config.yml> <file yml config.yml>
Ligne 363: Ligne 515:
  
 </file> </file>
 +
 +===== Proxy Apache vhosts =====
 +<file php radio.org.conf>
 + 
 +## Libretime - docker-container
 +<VirtualHost *:80>
 +
 +       ServerAdmin monmail@riseup.net 
 +       ServerName ****.***********.org
 +
 +       ErrorLog ${APACHE_LOG_DIR}/****.***********.org-error.log
 +       CustomLog ${APACHE_LOG_DIR}/****.***********.org-access.log combined
 +
 + ProxyPreserveHost       On
 + ProxyRequests           Off
 +
 +
 +       <Proxy *>
 +               Order deny,allow
 +               Allow from all
 +       </Proxy>
 +
 +RewriteEngine on
 +RewriteCond %{SERVER_NAME} =****.***********.org
 +RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
 +</VirtualHost>
 +
 +<file php radio.org-le-ssl.conf >
 +<IfModule mod_ssl.c>
 +<VirtualHost  *:443>
 +
 +    ServerAdmin **@riseup.net
 +    ServerName ****.***********.org
 +
 +       ErrorLog ${APACHE_LOG_DIR}/****.***********.org-error.log
 +       CustomLog ${APACHE_LOG_DIR}/****.***********.org-access.log combined
 +
 + ProxyPreserveHost On
 + ProxyRequests Off  
 +
 +       <Location />
 +        ProxyPass           http://localhost:8080/
 +        ProxyPassReverse    http://localhost:8080/
 +       </Location>
 +
 +       <Proxy *>
 +               Order deny,allow
 +               Allow from all
 +       </Proxy>
 +
 +        SSLEngine on
 +        SSLProxyEngine On
 +        SSLProxyVerify none
 +        SSLProxyCheckPeerCN off
 +        SSLProxyCheckPeerName off
 +        SSLProxyCheckPeerExpire off
 +
 + SSLCertificateFile /etc/letsencrypt/live/****.***********.org/fullchain.pem
 + SSLCertificateKeyFile /etc/letsencrypt/live/****.***********.org/privkey.pem
 + Include /etc/letsencrypt/options-ssl-apache.conf
 +</VirtualHost>
 +</IfModule>
 +</file>
 +
libretime_container_docker.1766094937.txt.gz · Dernière modification : de Benjamin Labomedia