libretime/docker-compose.simple.yml

151 lines
4.8 KiB
YAML

services:
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: 5s
timeout: 5s
retries: 12
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 status"]
interval: 5s
timeout: 5s
retries: 12
# Servicio que aplica migraciones (uno-por-vez). Ejecutar como "docker compose run --rm migrate" o usar start.sh
migrate:
image: ghcr.io/libretime/libretime-api:${LIBRETIME_VERSION:-4.5}
entrypoint: ["/bin/sh", "-c"]
# start.sh ahora espera a Postgres/rabbit; aquí solo aplicamos migraciones
command: "python3 /src/libretime_api/manage.py migrate --noinput"
depends_on:
- postgres
- rabbitmq
environment:
POSTGRES_USER: ${POSTGRES_USER:-libretime}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-libretime}
POSTGRES_DB: ${POSTGRES_DB:-libretime}
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-libretime}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-libretime}
api:
image: ghcr.io/libretime/libretime-api:${LIBRETIME_VERSION:-4.5}
restart: unless-stopped
depends_on:
- postgres
- rabbitmq
environment:
LIBRETIME_CONFIG_FILEPATH: /etc/libretime/config.yml
LIBRETIME_DEBUG: ${LIBRETIME_DEBUG:-false}
volumes:
- ${LIBRETIME_CONFIG_FILEPATH:-./config.local.yml}:/etc/libretime/config.yml:ro
- libretime_storage:/srv/libretime
legacy:
image: ghcr.io/libretime/libretime-legacy:${LIBRETIME_VERSION:-4.5}
restart: unless-stopped
depends_on:
- postgres
- rabbitmq
environment:
LIBRETIME_CONFIG_FILEPATH: /etc/libretime/config.yml
volumes:
- ${LIBRETIME_CONFIG_FILEPATH:-./config.local.yml}:/etc/libretime/config.yml:ro
- libretime_storage:/srv/libretime
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
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}
playout:
image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-4.5}
restart: unless-stopped
depends_on:
- rabbitmq
volumes:
- ${LIBRETIME_CONFIG_FILEPATH:-./config.local.yml}:/etc/libretime/config.yml:ro
- libretime_playout:/app
environment:
LIBRETIME_CONFIG_FILEPATH: /etc/libretime/config.yml
LIBRETIME_GENERAL_PUBLIC_URL: ${LIBRETIME_GENERAL_PUBLIC_URL:-http://localhost:8080}
liquidsoap:
image: ghcr.io/libretime/libretime-playout:${LIBRETIME_VERSION:-4.5}
command: /usr/local/bin/libretime-liquidsoap
restart: unless-stopped
depends_on:
- rabbitmq
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_CONFIG_FILEPATH: /etc/libretime/config.yml
worker:
image: ghcr.io/libretime/libretime-worker:${LIBRETIME_VERSION:-4.5}
restart: unless-stopped
depends_on:
- rabbitmq
volumes:
- ${LIBRETIME_CONFIG_FILEPATH:-./config.local.yml}:/etc/libretime/config.yml:ro
- libretime_storage:/srv/libretime
environment:
LIBRETIME_CONFIG_FILEPATH: /etc/libretime/config.yml
analyzer:
image: ghcr.io/libretime/libretime-analyzer:${LIBRETIME_VERSION:-4.5}
restart: unless-stopped
depends_on:
- rabbitmq
volumes:
- ${LIBRETIME_CONFIG_FILEPATH:-./config.local.yml}:/etc/libretime/config.yml:ro
- libretime_storage:/srv/libretime
environment:
LIBRETIME_CONFIG_FILEPATH: /etc/libretime/config.yml
volumes:
postgres_data:
driver: local
libretime_storage:
driver: local
libretime_playout:
driver: local