You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
synctv/docker-compose.yml

85 lines
1.9 KiB
YAML

services:
postgres:
image: postgres:18
container_name: synctv-postgres
env_file:
- path: .env.postgres
required: true
ports:
# Keep database access local to the host; the app uses the internal Docker network.
- "127.0.0.1:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U synctv"]
interval: 5s
timeout: 5s
retries: 5
start_period: 30s
networks:
- synctv
restart: unless-stopped
redis:
image: redis:8
container_name: synctv-redis
env_file:
- path: .env.redis
required: true
ports:
# Keep cache access local to the host; the app uses the internal Docker network.
- "127.0.0.1:6379:6379"
volumes:
- redis_data:/data
command: sh -ec 'exec redis-server --appendonly yes --requirepass "$$REDIS_PASSWORD"'
healthcheck:
test: ["CMD-SHELL", "REDISCLI_AUTH=\"$$REDIS_PASSWORD\" redis-cli ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- synctv
restart: unless-stopped
synctv:
image: synctvorg/synctv:latest
container_name: synctv-app
env_file:
- path: .env.synctv
required: true
environment:
# Keep application runtime data on the named volume.
SYNCTV_DATA_DIR: /data
ports:
- "8080:8080"
- "1935:1935"
- "3478:3478/udp"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- synctv
volumes:
- synctv_data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/health/ready"]
interval: 30s
timeout: 3s
start_period: 40s
retries: 3
volumes:
postgres_data:
driver: local
redis_data:
driver: local
synctv_data:
driver: local
networks:
synctv:
driver: bridge