-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (67 loc) · 1.73 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (67 loc) · 1.73 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
version: '3.2'
services:
etcd:
image: quay.io/coreos/etcd:v3.2
restart: always
ports:
- "2379:2379"
command: ["/usr/local/bin/etcd",
"--name", "node1",
"--initial-advertise-peer-urls", "http://etcd:2380",
"--listen-peer-urls", "http://0.0.0.0:2380",
"--advertise-client-urls", "http://etcd:2379",
"--listen-client-urls", "http://0.0.0.0:2379",
"--initial-cluster", "node1=http://etcd:2380",
"--initial-cluster-state", "new",
"--initial-cluster-token", "etcd-cluster"
]
environment:
ETCDCTL_API: 3
db:
image: postgres:10-alpine
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_DB: ring
zookeeper:
image: confluentinc/cp-zookeeper:4.1.0
restart: always
environment:
ZOOKEEPER_CLIENT_PORT: 32181
ports:
- "32181:32181"
kafka:
image: "confluentinc/cp-kafka:4.1.0"
restart: always
ports:
- "29092:29092"
depends_on:
- zookeeper
environment:
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:32181"
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_OFFSETS_STORAGE: 'kafka'
app_worker:
# image: "ktimothy/etcd3-sharding:0.1.0-SNAPSHOT"
build: target/docker/stage
restart: always
command: ["/app/bin/app", "worker"]
depends_on:
- db
- kafka
- etcd
volumes:
- "./docker/config:/app/config"
app_node:
# image: "ktimothy/etcd3-sharding:0.1.0-SNAPSHOT"
build: target/docker/stage
restart: always
command: ["/node"]
depends_on:
- app_worker
volumes:
- "./docker/config:/app/config"
- "./docker/node.sh:/node"
- "/var/run/docker.sock:/var/run/docker.sock"