television/docker-compose.yml

106 lines
2.2 KiB
YAML

version: '3'
networks:
net:
external: false
services:
haproxy:
image: haproxy:lts
env_file:
- "variables.env"
ports:
- "80:80"
- "443:443"
volumes:
- "./data/certificates:/certificates"
- "./config/haproxy:/usr/local/etc/haproxy"
depends_on:
- "certbot"
- "restreamer"
- "api"
restart: unless-stopped
networks:
- net
labels:
- meta.role=haproxy
certbot:
image: "certbot/certbot"
hostname: certbot
volumes:
- "./data/certificates:/certificates"
- "./data/certbot/etc:/etc/letsencrypt"
- "./data/certbot/var:/var/lib/letsencrypt"
- "./logs/certbot:/var/log/letsencrypt"
restart: unless-stopped
networks:
- net
labels:
- meta.role=certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 15d & wait $${!}; done;'"
restreamer:
image: datarhei/restreamer:2.11.0
env_file:
- "variables.env"
ports:
- "6000:6000/udp"
volumes:
- "./data/restreamer/config:/core/config"
- "./data/restreamer/data:/core/data"
restart: unless-stopped
networks:
- net
labels:
- meta.role=restreamer
api:
depends_on:
- "restreamer"
build: ./src/api
image: tv-api:latest
env_file:
- "variables.env"
volumes:
- "./config/api:/config"
- "./data/recorder:/recordings"
restart: unless-stopped
networks:
- net
labels:
- meta.role=api
discordbot:
depends_on:
- "api"
build: ./src/discordbot
image: tv-discordbot:latest
env_file:
- "variables.env"
restart: unless-stopped
networks:
- net
labels:
- meta.role=discordbot
icecast:
#depends_on:
# - "radiorelay"
build: ./src/icecast
image: tv-icecast:latest
env_file:
- "variables.env"
restart: unless-stopped
ports:
- "8000:8000"
volumes:
- /etc/localtime:/etc/localtime:ro
- "./config/icecast/icecast.xml.template:/etc/icecast2/icecast.xml.template"
- "./data/icecast:/usr/share/icecast2/web/data"
- "./logs/icecast:/var/log/icecast2"
networks:
- net
labels:
- meta.role=icecast