201 lines
5.4 KiB
YAML
201 lines
5.4 KiB
YAML
# docker-compose.yml — LOCAL DEVELOPMENT
|
|
# Target: local workstation or test lab (192.168.88.0/24).
|
|
# NOT for production. Use docker-compose.prod.yml for deployment.
|
|
# Services build from source; ports exposed for direct dev access.
|
|
|
|
services:
|
|
playout:
|
|
image: ${CI_REGISTRY_URL:-git.allucanget.biz}/${CI_REGISTRY_NAMESPACE:-zwitschi/linearvoid}/playout:latest
|
|
build:
|
|
context: ./backend/playout
|
|
dockerfile: Dockerfile
|
|
container_name: linearvoid-playout
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "${PLAYOUT_PORT:-8081}:8081"
|
|
volumes:
|
|
- ./data/playlist:/app/playlist:ro
|
|
- ./data/media:/app/media:ro
|
|
- ./data/hls:/app/hls:rw
|
|
- ./data/slate:/app/slate:ro
|
|
networks:
|
|
- linearvoid-net
|
|
depends_on:
|
|
- redis
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8081/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
chat:
|
|
image: ${CI_REGISTRY_URL:-git.allucanget.biz}/${CI_REGISTRY_NAMESPACE:-zwitschi/linearvoid}/chat:latest
|
|
build:
|
|
context: ./backend/chat
|
|
dockerfile: Dockerfile
|
|
container_name: linearvoid-chat
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "${CHAT_PORT:-3000}:3000"
|
|
volumes:
|
|
- ./data/chat:/app:rw
|
|
- ./data/playlist:/app/playlist:rw
|
|
- ./data/media:/app/media:rw
|
|
networks:
|
|
- linearvoid-net
|
|
depends_on:
|
|
- redis
|
|
- db
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
nginx:
|
|
image: ${CI_REGISTRY_URL:-git.allucanget.biz}/${CI_REGISTRY_NAMESPACE:-zwitschi/linearvoid}/nginx:latest
|
|
build:
|
|
context: .
|
|
dockerfile: infrastructure/nginx/Dockerfile
|
|
container_name: linearvoid-nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${NGINX_PORT:-8080}:80"
|
|
volumes:
|
|
- ./frontend/dist:/srv/frontend:ro
|
|
- ./data/hls:/srv/hls:ro
|
|
networks:
|
|
- linearvoid-net
|
|
depends_on:
|
|
- playout
|
|
- chat
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: linearvoid-redis
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
|
|
volumes:
|
|
- redis-data:/data
|
|
networks:
|
|
- linearvoid-net
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
container_name: linearvoid-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: linearvoid
|
|
POSTGRES_USER: linearvoid
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-linearvoid}
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
networks:
|
|
- linearvoid-net
|
|
|
|
nginx-exporter:
|
|
image: nginx/nginx-prometheus-exporter:latest
|
|
container_name: linearvoid-nginx-exporter
|
|
restart: unless-stopped
|
|
command:
|
|
- "-nginx.scrape-uri=http://nginx/nginx-status"
|
|
networks:
|
|
- linearvoid-net
|
|
depends_on:
|
|
- nginx
|
|
|
|
redis-exporter:
|
|
image: oliver006/redis_exporter:latest
|
|
container_name: linearvoid-redis-exporter
|
|
restart: unless-stopped
|
|
command:
|
|
- "-redis.addr=redis://redis:6379"
|
|
networks:
|
|
- linearvoid-net
|
|
depends_on:
|
|
- redis
|
|
|
|
postgres-exporter:
|
|
image: prometheuscommunity/postgres-exporter:latest
|
|
container_name: linearvoid-postgres-exporter
|
|
restart: unless-stopped
|
|
environment:
|
|
DATA_SOURCE_NAME: "postgresql://linearvoid:${POSTGRES_PASSWORD:-linearvoid}@db:5432/linearvoid?sslmode=disable"
|
|
networks:
|
|
- linearvoid-net
|
|
depends_on:
|
|
- db
|
|
|
|
node-exporter:
|
|
image: prom/node-exporter:latest
|
|
container_name: linearvoid-node-exporter
|
|
restart: unless-stopped
|
|
pid: host
|
|
volumes:
|
|
- /proc:/host/proc:ro
|
|
- /sys:/host/sys:ro
|
|
- /:/rootfs:ro
|
|
command:
|
|
- "--path.procfs=/host/proc"
|
|
- "--path.sysfs=/host/sys"
|
|
- "--path.rootfs=/rootfs"
|
|
- "--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)"
|
|
networks:
|
|
- linearvoid-net
|
|
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: linearvoid-prometheus
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
- ./monitoring/prometheus/alerts.yml:/etc/prometheus/alerts.yml
|
|
- prometheus-data:/prometheus
|
|
ports:
|
|
- "9090:9090"
|
|
networks:
|
|
- linearvoid-net
|
|
command:
|
|
- "--config.file=/etc/prometheus/prometheus.yml"
|
|
- "--storage.tsdb.path=/prometheus"
|
|
- "--storage.tsdb.retention.time=30d"
|
|
- "--storage.tsdb.retention.size=15GB"
|
|
- "--web.console.libraries=/etc/prometheus/console_libraries"
|
|
- "--web.console.templates=/etc/prometheus/consoles"
|
|
- "--web.enable-lifecycle"
|
|
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
container_name: linearvoid-grafana
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3001:3000"
|
|
volumes:
|
|
- grafana-data:/var/lib/grafana
|
|
- ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards
|
|
- ./monitoring/grafana/datasources:/etc/grafana/provisioning/datasources
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=admin
|
|
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
networks:
|
|
- linearvoid-net
|
|
depends_on:
|
|
- prometheus
|
|
|
|
networks:
|
|
linearvoid-net:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
redis-data:
|
|
postgres-data:
|
|
prometheus-data:
|
|
grafana-data:
|