television/docker-compose.yml

136 lines
3.4 KiB
YAML
Raw Normal View History

2023-12-30 23:15:22 -05:00
version: '3'
networks:
net:
external: false
services:
haproxy:
image: haproxy:lts
env_file:
- "variables.env"
2023-12-30 23:15:22 -05:00
ports:
- "80:80"
- "443:443"
volumes:
- "./data/certificates:/certificates"
- "./config/haproxy:/usr/local/etc/haproxy"
depends_on:
- "certbot"
- "restreamer"
- "scheduler"
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: sh -c 'while true; do sleep 1; done'
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 15d & wait $${!}; done;'"
restreamer:
image: datarhei/restreamer:2.7.0
2023-12-31 09:32:41 -05:00
env_file:
- "variables.env"
2023-12-30 23:15:22 -05:00
ports:
- "6000:6000/udp"
volumes:
- "./data/restreamer/config:/core/config"
- "./data/restreamer/data:/core/data"
2023-12-30 23:15:22 -05:00
restart: unless-stopped
networks:
- net
labels:
- meta.role=restreamer
scheduler:
depends_on:
- "restreamer"
build: ./src/scheduler
image: stream-scheduler:latest
2023-12-31 09:32:41 -05:00
env_file:
- "variables.env"
volumes:
- "./config/scheduler:/config"
2023-12-30 23:15:22 -05:00
restart: unless-stopped
networks:
- net
labels:
- meta.role=scheduler
recorder:
depends_on:
- "restreamer"
image: bluenviron/mediamtx:latest-ffmpeg
environment:
- MTX_PROTOCOLS=tcp
ports:
- "127.0.0.1:8554:8554"
2023-12-30 23:15:22 -05:00
volumes:
2024-01-01 15:21:06 -05:00
- "./config/recorder/mediamtx.yml:/mediamtx.yml"
- "./data/recorder:/recordings"
# Set local fqdn to use internally in the restreamer
hostname: recorder.local
2023-12-30 23:15:22 -05:00
restart: unless-stopped
networks:
- net
labels:
- meta.role=recorder
archive-api:
depends_on:
- "recorder"
image: xemle/home-gallery-api-server
environment:
# TensorflowJS backends
# - cpu: slowest and best support
# - wasm: good perfromance for arm64 and amd64 platforms
# - node: best performance on amd64 platform
#- BACKEND=cpu
- BACKEND=wasm
#- BACKEND=node
2024-01-04 07:56:49 -05:00
restart: unless-stopped
networks:
- net
labels:
- meta.role=archive-api
2023-12-30 23:15:22 -05:00
archive:
depends_on:
- "recorder"
image: xemle/home-gallery:1.14.6
environment:
- GALLERY_API_SERVER=http://archive-api:3000
2024-01-02 21:42:43 -05:00
- GALLERY_API_SERVER_CONCURRENT=5 # for SoC devices like Rasperry Pi. Use 5 otherwise
- GALLERY_API_SERVER_TIMEOUT=30 # for SoC devices like Rasperry Pi. Use 30 otherwise
#- GALLERY_USE_NATIVE=ffprobe,ffmpeg,vipsthumbnail # On issues with sharp resizer
- GALLERY_OPEN_BROWSER=false
# Use polling for safety of possible network mounts. Try 0 to use inotify via fs.watch
- GALLERY_WATCH_POLL_INTERVAL=300
2023-12-30 23:15:22 -05:00
volumes:
- "./config/archive/gallery.config.yml:/data/config/gallery.config.yml"
- "./data/archive:/data"
- "./data/recorder/vod:/data/vod:ro"
#user: "${CURRENT_USER}"
entrypoint: ['node', '/app/gallery.js']
command: ['run', 'server']
2023-12-30 23:15:22 -05:00
restart: unless-stopped
networks:
- net
labels:
- meta.role=archive