denpa-radio/docker-compose.yml
devilreef 3b4ce1ce39
fix(streamer): drop fonts-vt323 (not in bookworm) and use node fetch for healthcheck
- fonts-vt323 doesn't exist in debian bookworm; vt323 is loaded via google fonts cdn anyway.
- node:22-bookworm-slim has no wget; switch healthcheck to node -e fetch.
2026-04-30 15:41:17 +06:00

97 lines
2.5 KiB
YAML

name: 'denpa-radio'
services:
icecast:
image: libretime/icecast:2.4.4
restart: always
ports:
- '172.17.0.1:12000:8000'
volumes:
- type: bind
source: ./config/icecast.xml
target: /etc/icecast.xml
read_only: true
healthcheck:
test: ['CMD', 'bash', '-c', 'exec 3<>/dev/tcp/localhost/8000 && printf "GET /status-json.xsl HTTP/1.0\r\nHost: localhost\r\n\r\n" >&3 && grep -q icestats <&3']
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
liquidsoap:
image: savonet/liquidsoap:v2.3.3
restart: always
env_file: config/liquidsoap.env
depends_on:
icecast:
condition: service_healthy
volumes:
- type: bind
source: /mnt/trashbox/denpa-radio/library
target: /library
read_only: true
- type: bind
source: ./config/liquidsoap.liq
target: /script.liq
read_only: true
- type: bind
source: ./data/now-playing
target: /now-playing
command: ['liquidsoap', '/script.liq']
healthcheck:
test: ['CMD-SHELL', 'pidof liquidsoap >/dev/null || exit 1']
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
frontend:
build: ./frontend
image: denpa-radio-frontend:latest
restart: always
env_file: config/frontend.env
ports:
- '172.17.0.1:12001:3000'
volumes:
- type: bind
source: /mnt/trashbox/denpa-radio/library
target: /library
read_only: true
- type: bind
source: ./data/now-playing
target: /now-playing
read_only: true
healthcheck:
test: ['CMD', 'wget', '-q', '-O', '-', 'http://127.0.0.1:3000/api/stations.json']
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
streamer-minecraft-tg:
build: ./streamer
image: denpa-radio-streamer:latest
restart: always
env_file: config/streamer-minecraft-tg.env
depends_on:
liquidsoap:
condition: service_healthy
volumes:
- type: bind
source: /mnt/trashbox/denpa-radio/library
target: /library
read_only: true
- type: bind
source: ./data/now-playing
target: /now-playing
read_only: true
shm_size: '1gb'
ports:
- '172.17.0.1:12010:12010'
healthcheck:
test: ['CMD', 'node', '-e', "fetch('http://127.0.0.1:12010/health').then(r=>r.json()).then(j=>{if(!j.ok)process.exit(1)}).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s