-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathdocker-compose.yml
123 lines (116 loc) · 2.62 KB
/
docker-compose.yml
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
112
113
114
115
116
117
118
119
120
121
122
123
services:
indexer:
image: listen-indexer
build:
context: ./listen-data
dockerfile: Dockerfile
env_file:
- .env
volumes:
- .env:/app/.env
environment:
- REDIS_URL=redis://redis:6379
- CLICKHOUSE_URL=http://clickhouse:8123
- CLICKHOUSE_USER=default
- CLICKHOUSE_PASSWORD=default
- CLICKHOUSE_DATABASE=default
depends_on:
redis:
condition: service_healthy
clickhouse:
condition: service_healthy
adapter:
image: listen-adapter
build:
context: ./listen-adapter
dockerfile: Dockerfile
environment:
- REDIS_URL=redis://redis:6379
- HOST=0.0.0.0
- PORT=6968
ports:
- 6968:6968
depends_on:
redis:
condition: service_healthy
redis:
build:
context: ./vendor/redis
dockerfile: Dockerfile
ports:
- 6379:6379
volumes:
- redis-data:/data
deploy:
resources:
limits:
cpus: "2"
memory: "1.5G"
ulimits:
nofile:
soft: 65536
hard: 65536
command: redis-server /usr/local/etc/redis/redis.conf --save "" --appendonly no
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
clickhouse:
build:
context: ./vendor/clickhouse
dockerfile: Dockerfile
ports:
- 8123:8123
- 9000:9000
volumes:
- clickhouse-data:/var/lib/clickhouse
- clickhouse-logs:/var/log/clickhouse-server
environment:
- CLICKHOUSE_PASSWORD=default
- CLICKHOUSE_HOST=0.0.0.0
ulimits:
nofile:
soft: 262144
hard: 262144
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--tries=1",
"--spider",
"http://localhost:8123/ping",
]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
grafana:
image: grafana/grafana-oss
ports:
- 3001:3000
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
prometheus:
image: prom/prometheus
ports:
- 9090:9090
volumes:
- ./listen-engine/prometheus.yml:/etc/prometheus/prometheus.yml
# this is not ran, would require tweaking the config
nginx:
image: nginx
ports:
- 6000:80
- 6001:443
volumes:
- ./vendor/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./cert.pem:/etc/letsencrypt/live/api.listen-rs.com/fullchain.pem:ro
- ./privkey.pem:/etc/letsencrypt/live/api.listen-rs.com/privkey.pem:ro
network_mode: host
volumes:
redis-data:
clickhouse-data:
clickhouse-logs: