67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
# Local development
|
|
# docker compose -f docker-compose.local.yml up -d
|
|
name: electro4ort-local
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:19-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
POSTGRES_DB: ${POSTGRES_DB:-electro4ort}
|
|
ports:
|
|
- "127.0.0.1:${POSTGRES_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"']
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
redis:
|
|
image: redis:8-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "127.0.0.1:${REDIS_PORT:-6379}:6379"
|
|
volumes:
|
|
- redis-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
# Voice and video calls. Browsers connect to it themselves, on 7880 for
|
|
# signalling and 7881 (TCP) or 7882 (UDP) for the media. It tells the API
|
|
# who joined and left by calling its /livekit/webhook route.
|
|
livekit:
|
|
image: livekit/livekit-server:v1.13
|
|
restart: unless-stopped
|
|
environment:
|
|
LIVEKIT_CONFIG: |
|
|
port: 7880
|
|
rtc:
|
|
tcp_port: 7881
|
|
udp_port: 7882
|
|
use_external_ip: false
|
|
node_ip: 127.0.0.1
|
|
keys:
|
|
${LIVEKIT_API_KEY:-devkey}: ${LIVEKIT_API_SECRET:-local-development-secret-0123456789}
|
|
webhook:
|
|
api_key: ${LIVEKIT_API_KEY:-devkey}
|
|
urls:
|
|
- http://host.docker.internal:${API_PORT:-3001}/livekit/webhook
|
|
ports:
|
|
- "127.0.0.1:7880:7880"
|
|
- "127.0.0.1:7881:7881"
|
|
- "127.0.0.1:7882:7882/udp"
|
|
extra_hosts:
|
|
# Docker Desktop has this name already; on Linux it needs adding.
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
volumes:
|
|
postgres-data:
|
|
redis-data:
|