-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
71 lines (69 loc) · 1.82 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
version: "3.5"
#Docker host machine IP - copy below export command without # and execute before executing docker-compose command. or copy into bash_profile or bash.rc file.
#export DOCKER_HOST_IP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`
services:
zookeeper:
hostname: zookeeper
image: wurstmeister/zookeeper:latest
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
kafka:
image: wurstmeister/kafka:latest
links:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: $DOCKER_HOST_IP
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "delivery:100:1,click:100:1,install:100:1"
redis:
image: redis
hostname: redis
ports:
- "6379:6379"
volumes:
- /Users/gramcha/source/docker/data/redis:/data
mongo:
image: mongo:3.6.1
container_name: mongo
volumes:
- /Users/gramcha/source/docker/data/mongodb:/data/db
- /Users/gramcha/source/docker/config:/data/configdb
ports:
- 27017:27017
command: mongod
ingest-service:
build: ./ingest-service
ports:
# - "8080:8080" # if running with out haproxy then enable this.
- 8080
depends_on:
- redis
- kafka
# loadbalance ingest-service
# scale up ingest service using command 'docker-compose scale ingest-service=2'
lb:
image: dockercloud/haproxy
links:
- ingest-service
ports:
- '80:80'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
store-service:
build: ./store-service
ports:
- "8181:8181"
depends_on:
- mongo
- kafka
query-service:
build: ./query-service
ports:
- "8282:8282"
depends_on:
- mongo