docs: Add 42 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 59s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 59s
This commit is contained in:
122
squashkiwi-streaming/config/docker-compose.yml
Normal file
122
squashkiwi-streaming/config/docker-compose.yml
Normal file
@@ -0,0 +1,122 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# MediaMTX - RTSP/HLS/WebRTC streaming server
|
||||
mediamtx:
|
||||
image: bluenviron/mediamtx:latest
|
||||
container_name: ${PROJECT_NAME}-mediamtx
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./mediamtx.yml:/mediamtx.yml
|
||||
- ${RECORDINGS_PATH}:/recordings
|
||||
environment:
|
||||
- MTX_PROTOCOLS=tcp
|
||||
- CAMERA_USER=${CAMERA_USER}
|
||||
- CAMERA_PASSWORD=${CAMERA_PASSWORD}
|
||||
- CAMERA_IP=${CAMERA_IP}
|
||||
- CAMERA_RTSP_PORT=${CAMERA_RTSP_PORT}
|
||||
- COURT_ID=${COURT_ID}
|
||||
- COURT_NAME=${COURT_NAME}
|
||||
- PUBLISH_PASSWORD=${PUBLISH_PASSWORD:-admin}
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:9997/v2/paths/list"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# Score overlay and recording service
|
||||
overlay-service:
|
||||
build: ./overlay
|
||||
image: ${PROJECT_NAME}-overlay:latest
|
||||
container_name: ${PROJECT_NAME}-overlay
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- mediamtx
|
||||
volumes:
|
||||
- ${RECORDINGS_PATH}:/recordings
|
||||
environment:
|
||||
- SQUASHKIWI_API=${SQUASHKIWI_API}
|
||||
- COURT_ID=${COURT_ID}
|
||||
- MEDIAMTX_API=http://localhost:9997
|
||||
- RECORDING_PATH=/recordings
|
||||
- IDLE_TIMEOUT=${IDLE_TIMEOUT}
|
||||
- RECORDING_RETENTION_DAYS=${RECORDING_RETENTION_DAYS}
|
||||
healthcheck:
|
||||
test: ["CMD", "pgrep", "-f", "overlay_service.py"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# Nginx web server
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: ${PROJECT_NAME}-nginx
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${HOST_PORT}:80"
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./web:/usr/share/nginx/html:ro
|
||||
- ${RECORDINGS_PATH}:/recordings:ro
|
||||
- nginx-cache:/var/cache/nginx
|
||||
depends_on:
|
||||
- mediamtx
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
# Optional: Cloudflare tunnel
|
||||
cloudflared:
|
||||
image: cloudflare/cloudflared:latest
|
||||
container_name: ${PROJECT_NAME}-tunnel
|
||||
restart: unless-stopped
|
||||
command: tunnel run
|
||||
environment:
|
||||
- TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN}
|
||||
profiles:
|
||||
- tunnel
|
||||
|
||||
# Optional: Prometheus monitoring
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: ${PROJECT_NAME}-prometheus
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- prometheus-data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
profiles:
|
||||
- monitoring
|
||||
|
||||
# Optional: Grafana
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: ${PROJECT_NAME}-grafana
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- grafana-data:/var/lib/grafana
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
|
||||
depends_on:
|
||||
- prometheus
|
||||
profiles:
|
||||
- monitoring
|
||||
|
||||
volumes:
|
||||
nginx-cache:
|
||||
prometheus-data:
|
||||
grafana-data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${PROJECT_NAME}
|
||||
driver: bridge
|
Reference in New Issue
Block a user