-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
86 lines (84 loc) · 2.01 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
version: '3'
services:
redis:
image: "redis:alpine"
scylla:
image: "scylladb/scylla:latest"
zookeeper:
image: "wurstmeister/zookeeper"
ports:
- "2181:2181"
kafka:
image: "wurstmeister/kafka"
depends_on:
- "zookeeper"
ports:
- "9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 172.17.0.1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
# Set 4 partitions if you want 4 processors to run...
KAFKA_CREATE_TOPICS: "sessions:1:1"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# Fo LB is nginx.
fo:
image: "tekn0ir/nginx-stream:latest"
volumes:
- ./fo/nginx.conf:/opt/nginx/stream.conf.d/default.conf
depends_on:
- "fo01"
- "fo02"
generator:
build: ./generator
depends_on:
- "kafka"
- "redis"
processor01:
build: ./processor
depends_on:
- "kafka"
- "scylla"
- "redis"
entrypoint:
- "/go/bin/processor"
- "-init"
# processor01 will create schema, so wait for it.
processor02:
build: ./processor
depends_on:
- "kafka"
- "scylla"
- "redis"
- "processor01"
processor03:
build: ./processor
depends_on:
- "kafka"
- "scylla"
- "redis"
- "processor01"
processor04:
build: ./processor
depends_on:
- "kafka"
- "scylla"
- "redis"
- "processor01"
# Multiple fo servers
fo01:
build: ./fo
depends_on:
- "processor01"
- "kafka"
- "scylla"
fo02:
build: ./fo
depends_on:
- "processor01"
- "kafka"
- "scylla"
client:
build: ./client
depends_on:
- "fo"