mirror of https://github.com/synctv-org/synctv
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.
81 lines
2.0 KiB
YAML
81 lines
2.0 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:18
|
|
container_name: synctv-postgres
|
|
environment:
|
|
POSTGRES_USER: synctv
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-synctv}
|
|
POSTGRES_DB: synctv
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres18_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
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
command: redis-server --appendonly yes
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
networks:
|
|
- synctv
|
|
restart: unless-stopped
|
|
|
|
synctv:
|
|
image: synctvorg/synctv:v1
|
|
container_name: synctv-app
|
|
ports:
|
|
- "8080:8080"
|
|
- "1935:1935"
|
|
- "3478:3478/udp"
|
|
environment:
|
|
SYNCTV_DATABASE_URL: postgresql://synctv:${POSTGRES_PASSWORD:-synctv}@postgres:5432/synctv
|
|
SYNCTV_REDIS_URL: redis://redis:6379
|
|
SYNCTV_SERVER_HOST: 0.0.0.0
|
|
SYNCTV_SERVER_PORT: 8080
|
|
SYNCTV_JWT_SECRET: ${SYNCTV_JWT_SECRET:?SYNCTV_JWT_SECRET must be set (min 32 chars)}
|
|
SYNCTV_SERVER_CLUSTER_SECRET: ${SYNCTV_SERVER_CLUSTER_SECRET:-changeme-generate-a-random-secret}
|
|
SYNCTV_BOOTSTRAP_CREATE_ROOT_USER: "true"
|
|
SYNCTV_BOOTSTRAP_ROOT_PASSWORD: ${SYNCTV_BOOTSTRAP_ROOT_PASSWORD:?SYNCTV_BOOTSTRAP_ROOT_PASSWORD
|
|
must be set (min 12 chars, mixed case + digit)}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- synctv
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"]
|
|
interval: 30s
|
|
timeout: 3s
|
|
start_period: 40s
|
|
retries: 3
|
|
|
|
volumes:
|
|
postgres18_data:
|
|
driver: local
|
|
redis_data:
|
|
driver: local
|
|
|
|
networks:
|
|
synctv:
|
|
driver: bridge
|