Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (87 loc) · 2.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
92 lines (87 loc) · 2.13 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
services:
karl:
build: .
container_name: karl-media-server
restart: unless-stopped
network_mode: host
volumes:
- ./config:/etc/karl:ro
- recordings:/var/lib/karl/recordings
environment:
- KARL_CONFIG_PATH=/etc/karl/config.json
- KARL_LOG_LEVEL=info
- KARL_HEALTH_PORT=:8086
- KARL_METRICS_PORT=:9091
- KARL_API_PORT=:8080
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8086/live"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
mysql:
image: mariadb:10.11
container_name: karl-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: karl
MYSQL_USER: karl
MYSQL_PASSWORD: karlpassword
volumes:
- mysql-data:/var/lib/mysql
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 30s
timeout: 10s
retries: 3
redis:
image: redis:7-alpine
container_name: karl-redis
restart: unless-stopped
volumes:
- redis-data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 5s
retries: 3
prometheus:
image: prom/prometheus:latest
container_name: karl-prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./deploy/docker/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
grafana:
image: grafana/grafana:latest
container_name: karl-grafana
restart: unless-stopped
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- grafana-data:/var/lib/grafana
depends_on:
- prometheus
volumes:
recordings:
mysql-data:
redis-data:
prometheus-data:
grafana-data: