From 3e37f6190b1c86756659039d1376ef65d125b279 Mon Sep 17 00:00:00 2001 From: Cesar Jhoanny Mendivil Rubio Date: Wed, 1 Oct 2025 18:17:56 -0700 Subject: [PATCH] =?UTF-8?q?feat(docker-compose):=20agregar=20servicio=20co?= =?UTF-8?q?nfig-generator=20con=20verificaci=C3=B3n=20de=20salud=20y=20con?= =?UTF-8?q?figuraci=C3=B3n=20inicial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.yml | 71 +++++++++++++++++++++++++++++++ easypanel/code/docker-compose.yml | 26 ++++++++--- 2 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 config/config.yml diff --git a/config/config.yml b/config/config.yml new file mode 100644 index 000000000..78e76ee55 --- /dev/null +++ b/config/config.yml @@ -0,0 +1,71 @@ +general: + public_url: http://localhost:8080 + api_key: some_secret_api_key + secret_key: some_secret_key + +database: + host: postgres + +rabbitmq: + host: rabbitmq + +email: + host: mailpit + port: 1025 + +playout: + liquidsoap_host: liquidsoap + +liquidsoap: + server_listen_address: 0.0.0.0 + + harbor_ssl_certificate: /certs/fake.crt + harbor_ssl_private_key: /certs/fake.key + +stream: + inputs: + main: + public_url: https://localhost:8001/main + mount: main + port: 8001 + secure: true + + outputs: + .default_icecast_output: &default_icecast_output + host: icecast + port: 8000 + source_password: hackme + admin_password: hackme + name: LibreTime! + description: LibreTime Radio! + website: https://libretime.org + genre: various + + icecast: + - <<: *default_icecast_output + enabled: true + mount: main.ogg + public_url: https://localhost:8443/main.ogg + audio: + format: ogg + bitrate: 256 + + - <<: *default_icecast_output + enabled: true + mount: main.opus + public_url: https://localhost:8443/main.opus + audio: + format: opus + bitrate: 256 + + - <<: *default_icecast_output + enabled: true + mount: main.mp3 + public_url: https://localhost:8443/main.mp3 + audio: + format: mp3 + bitrate: 256 + + system: + - enabled: false + kind: pulseaudio diff --git a/easypanel/code/docker-compose.yml b/easypanel/code/docker-compose.yml index d769ef7ab..5f8bb5876 100644 --- a/easypanel/code/docker-compose.yml +++ b/easypanel/code/docker-compose.yml @@ -51,6 +51,8 @@ services: condition: service_healthy rabbitmq: condition: service_healthy + config-generator: + condition: service_healthy environment: LIBRETIME_GENERAL_PUBLIC_URL: ${LIBRETIME_GENERAL_PUBLIC_URL:-http://localhost:8080} LIBRETIME_DEBUG: ${LIBRETIME_DEBUG:-false} @@ -70,6 +72,8 @@ services: condition: service_healthy rabbitmq: condition: service_healthy + config-generator: + condition: service_healthy volumes: - libretime_config:/etc/libretime:ro - libretime_storage:/srv/libretime @@ -161,6 +165,21 @@ services: - libretime_config:/etc/libretime:ro - libretime_storage:/srv/libretime + # (No se incluye servicio composer; seguir método Docker estándar de LibreTime) + + # Generador de configuración (escrito por el panel desde variables/secretos) + config-generator: + image: alpine:3.18 + restart: "no" + entrypoint: ["/bin/sh","/tools/easypanel-config-generator.sh"] + volumes: + - libretime_config:/config + - ./tools:/tools:ro + healthcheck: + test: ["CMD-SHELL","test -f /config/config.yml"] + interval: 2s + timeout: 2s + retries: 10 # Volúmenes persistentes volumes: @@ -171,9 +190,4 @@ volumes: libretime_playout: driver: local libretime_config: - driver: local - -# Red personalizada (opcional para EasyPanel) -networks: - default: - name: libretime_network \ No newline at end of file + driver: local \ No newline at end of file