# LibreTime Docker Compose (EasyPanel-ready) # Esta versión está pensada para usarse desde un repositorio en EasyPanel. # Principios: # - No almacenar secretos en archivos del repo: EasyPanel proporcionará los valores # mediante variables/secretos de entorno. # - Un servicio `config-generator` genera `/config/config.yml` dentro del volumen # `libretime_config` a partir de variables de entorno. Los servicios montan ese # volumen en `/etc/libretime`. services: # Base de datos PostgreSQL postgres: image: postgres:15 restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-libretime} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-Jz/XxRUodVl2g0HE59DszTBJVY8Sdmv7} POSTGRES_DB: ${POSTGRES_DB:-libretime} volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-libretime}"] interval: 30s timeout: 10s retries: 3 # Message broker RabbitMQ rabbitmq: image: rabbitmq:3.13-alpine restart: unless-stopped environment: RABBITMQ_DEFAULT_VHOST: ${RABBITMQ_DEFAULT_VHOST:-/libretime} RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-libretime} RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-Bn321PQSRXanvmZlppuulVCB0ShN5Dz2} healthcheck: test: ["CMD-SHELL", "rabbitmq-diagnostics check_port_connectivity"] interval: 30s timeout: 10s retries: 3 # API de LibreTime api: image: ghcr.io/libretime/libretime-api:${LIBRETIME_VERSION:-4.5} restart: unless-stopped init: true ulimits: nofile: 1024 depends_on: postgres: 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} volumes: - libretime_config:/etc/libretime:ro - libretime_storage:/srv/libretime # Aplicación Legacy de LibreTime legacy: image: ghcr.io/libretime/libretime-legacy:${LIBRETIME_VERSION:-4.5} restart: unless-stopped init: true ulimits: nofile: 1024 depends_on: postgres: condition: service_healthy rabbitmq: condition: service_healthy config-generator: condition: service_healthy volumes: - libretime_config:/etc/libretime:ro - libretime_storage:/srv/libretime # Servidor web Nginx nginx: image: ghcr.io/libretime/libretime-nginx:${LIBRETIME_VERSION:-4.5} restart: unless-stopped depends_on: - legacy - api volumes: - libretime_storage:/srv/libretime:ro - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro environment: - NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-auto} # Servidor de streaming Icecast icecast: image: ghcr.io/libretime/icecast:2.4.4 restart: unless-stopped environment: ICECAST_SOURCE_PASSWORD: ${ICECAST_SOURCE_PASSWORD:-dna1g1GcaaHakSN6C9X7rcPRpIIc/jV2} ICECAST_ADMIN_PASSWORD: ${ICECAST_ADMIN_PASSWORD:-BLoYLPlUXfmkxrsvGF7LP0TtVtuKNuzJ} ICECAST_RELAY_PASSWORD: ${ICECAST_RELAY_PASSWORD:-jYzhEjwdiJlTk30QOYHum6UE61FHo+sd} ICECAST_ADMIN_USER: ${ICECAST_ADMIN_USER:-admin} ICECAST_HOSTNAME: ${ICECAST_HOSTNAME:-localhost} # Servicio de playout playout: image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-4.5} restart: unless-stopped init: true ulimits: nofile: 1024 depends_on: rabbitmq: condition: service_healthy volumes: - libretime_config:/etc/libretime:ro - libretime_playout:/app environment: LIBRETIME_GENERAL_PUBLIC_URL: ${LIBRETIME_GENERAL_PUBLIC_URL:-http://localhost:8080} # Liquidsoap para streaming liquidsoap: image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-4.5} command: /usr/local/bin/libretime-liquidsoap restart: unless-stopped init: true ulimits: nofile: 1024 depends_on: rabbitmq: condition: service_healthy volumes: - libretime_config:/etc/libretime:ro - libretime_playout:/app environment: LIBRETIME_GENERAL_PUBLIC_URL: ${LIBRETIME_GENERAL_PUBLIC_URL:-http://localhost:8080} # Worker para tareas en background worker: image: ghcr.io/libretime/libretime-worker:${LIBRETIME_VERSION:-4.5} restart: unless-stopped init: true ulimits: nofile: 1024 depends_on: rabbitmq: condition: service_healthy volumes: - libretime_config:/etc/libretime:ro - libretime_storage:/srv/libretime environment: LIBRETIME_GENERAL_PUBLIC_URL: ${LIBRETIME_GENERAL_PUBLIC_URL:-http://localhost:8080} # Analyzer para análisis de archivos de audio analyzer: image: ghcr.io/libretime/libretime-analyzer:${LIBRETIME_VERSION:-4.5} restart: unless-stopped init: true ulimits: nofile: 1024 depends_on: rabbitmq: condition: service_healthy volumes: - 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: postgres_data: driver: local libretime_storage: driver: local libretime_playout: driver: local libretime_config: driver: local # Red personalizada (opcional para EasyPanel) networks: default: name: libretime_network