-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.yml
110 lines (110 loc) · 3.03 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
---
version: "3.9"
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: always
user: root
ports:
- 9090:9090
volumes:
- ./prometheus/config:/etc/prometheus/
- ./data/prometheus:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: always
user: root
volumes:
- ./data/grafana:/var/lib/grafana
ports:
- 3000:3000
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SECURITY_ADMIN_USER=admin
clickhouse:
image: yandex/clickhouse-server:21.3.4.25 # LTS
container_name: clickhouse
restart: always
volumes:
- ./clickhouse/config.xml:/etc/clickhouse-server/config.xml
expose:
- 9363
ports:
- "9363:9363"
ulimits:
nproc: 65535
nofile:
soft: 262144
hard: 262144
clickhouse-benchmark:
image: yandex/clickhouse-server:21.3.4.25 # LTS
container_name: clickhouse-benchmark
restart: always
entrypoint:
- /bin/bash
command:
- -c
- "echo 'SELECT * FROM system.numbers LIMIT 10000000 OFFSET 10000000' | clickhouse-benchmark -h clickhouse"
etcd1: &etcd
image: weastur/patroni:2.0.2
environment:
ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_INITIAL_CLUSTER: etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_INITIAL_CLUSTER_TOKEN: tutorial
container_name: demo-etcd1
hostname: etcd1
command: etcd -name etcd1 -initial-advertise-peer-urls http://etcd1:2380
etcd2:
<<: *etcd
container_name: demo-etcd2
hostname: etcd2
command: etcd -name etcd2 -initial-advertise-peer-urls http://etcd2:2380
etcd3:
<<: *etcd
container_name: demo-etcd3
hostname: etcd3
command: etcd -name etcd3 -initial-advertise-peer-urls http://etcd3:2380
haproxy:
image: weastur/patroni:2.0.2
env_file: patroni/patroni.env
hostname: haproxy
container_name: demo-haproxy
ports:
- "5000:5000"
- "5001:5001"
command: haproxy
environment: &haproxy_env
ETCDCTL_ENDPOINTS: http://etcd1:2379,http://etcd2:2379,http://etcd3:2379
PATRONI_ETCD3_HOSTS: "'etcd1:2379','etcd2:2379','etcd3:2379'"
PATRONI_SCOPE: demo
patroni1:
image: weastur/patroni:2.0.2
env_file: patroni/patroni.env
hostname: patroni1
container_name: demo-patroni1
environment:
<<: *haproxy_env
PATRONI_NAME: patroni1
patroni2:
image: weastur/patroni:2.0.2
env_file: patroni/patroni.env
hostname: patroni2
container_name: demo-patroni2
environment:
<<: *haproxy_env
PATRONI_NAME: patroni2
patroni3:
image: weastur/patroni:2.0.2
env_file: patroni/patroni.env
hostname: patroni3
container_name: demo-patroni3
environment:
<<: *haproxy_env
PATRONI_NAME: patroni3