libretime/docker-compose.easypanel.yml

179 lines
5.2 KiB
YAML

# LibreTime Docker Compose para EasyPanel
# Basado en el docker-compose oficial de LibreTime
# Optimizado para despliegue en EasyPanel
services:
# Base de datos PostgreSQL
postgres:
image: postgres:15
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-libretime}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-libretime}
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:-libretime}
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
environment:
LIBRETIME_GENERAL_PUBLIC_URL: ${LIBRETIME_GENERAL_PUBLIC_URL:-http://localhost:8080}
LIBRETIME_DEBUG: ${LIBRETIME_DEBUG:-false}
volumes:
- ${LIBRETIME_CONFIG_FILEPATH:-./config.local.yml}:/etc/libretime/config.yml: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
volumes:
- ${LIBRETIME_CONFIG_FILEPATH:-./config.local.yml}:/etc/libretime/config.yml: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
ports:
- "${NGINX_PORT:-8080}:8080"
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
ports:
- "${ICECAST_PORT:-8000}:8000"
environment:
ICECAST_SOURCE_PASSWORD: ${ICECAST_SOURCE_PASSWORD:-hackme}
ICECAST_ADMIN_PASSWORD: ${ICECAST_ADMIN_PASSWORD:-hackme}
ICECAST_RELAY_PASSWORD: ${ICECAST_RELAY_PASSWORD:-hackme}
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_FILEPATH:-./config.local.yml}:/etc/libretime/config.yml: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
ports:
- "${LIQUIDSOAP_HARBOR_PORT:-8001}:8001"
- "${LIQUIDSOAP_TELNET_PORT:-8002}:8002"
volumes:
- ${LIBRETIME_CONFIG_FILEPATH:-./config.local.yml}:/etc/libretime/config.yml: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:
- ./config.local.yml:/etc/libretime/config.yml: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:
- ./config.local.yml:/etc/libretime/config.yml:ro
- libretime_storage:/srv/libretime
# (No se incluye servicio composer; seguir método Docker estándar de LibreTime)
# Volúmenes persistentes
volumes:
postgres_data:
driver: local
libretime_storage:
driver: local
libretime_playout:
driver: local
# Red personalizada (opcional para EasyPanel)
networks:
default:
name: libretime_network