-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
111 lines (100 loc) 路 2.95 KB
/
Copy pathdocker-compose.example.yml
File metadata and controls
111 lines (100 loc) 路 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: "3.8"
services:
redis:
image: redis:7-alpine
container_name: soketi-redis
command: redis-server --requirepass ${REDIS_PASSWORD:-soketi} --appendonly yes
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- soketi
soketi:
image: funal/soketi-rs:latest
container_name: soketi-server
depends_on:
- redis
ports:
- "${SOKETI_PORT:-6001}:6001"
- "${SOKETI_METRICS_PORT:-9601}:9601"
environment:
# Server Configuration
PUSHER_DEBUG: "true"
PUSHER_HOST: "0.0.0.0"
PUSHER_PORT: "6001"
# App Configuration (Option 1: Default App)
PUSHER_DEFAULT_APP_ID: "${APP_ID:-app-id}"
PUSHER_DEFAULT_APP_KEY: "${APP_KEY:-app-key}"
PUSHER_DEFAULT_APP_SECRET: "${APP_SECRET:-app-secret}"
# App Configuration (Option 2: JSON Array - uncomment to use)
# PUSHER_APP_MANAGER_ARRAY_APPS: '[{"id":"app1","key":"key1","secret":"secret1","enabled":true},{"id":"app2","key":"key2","secret":"secret2","enabled":true}]'
# Adapter Configuration (Redis for horizontal scaling)
PUSHER_ADAPTER_DRIVER: "redis"
PUSHER_ADAPTER_REDIS_HOST: "redis"
PUSHER_ADAPTER_REDIS_PORT: "6379"
PUSHER_ADAPTER_REDIS_PASSWORD: "${REDIS_PASSWORD:-soketi}"
PUSHER_ADAPTER_REDIS_DB: "0"
# Cache Configuration (Redis)
PUSHER_CACHE_DRIVER: "redis"
PUSHER_CACHE_REDIS_HOST: "redis"
PUSHER_CACHE_REDIS_PORT: "6379"
PUSHER_CACHE_REDIS_PASSWORD: "${REDIS_PASSWORD:-soketi}"
# Metrics Configuration
PUSHER_METRICS_ENABLED: "true"
PUSHER_METRICS_PORT: "9601"
PUSHER_METRICS_PREFIX: "soketi"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6001/"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
networks:
- soketi
restart: unless-stopped
# Optional: Prometheus for metrics collection
prometheus:
image: prom/prometheus:latest
container_name: soketi-prometheus
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'
networks:
- soketi
profiles:
- monitoring
# Optional: Grafana for metrics visualization
grafana:
image: grafana/grafana:latest
container_name: soketi-grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}
volumes:
- grafana_data:/var/lib/grafana
networks:
- soketi
profiles:
- monitoring
volumes:
redis_data:
driver: local
prometheus_data:
driver: local
grafana_data:
driver: local
networks:
soketi:
driver: bridge