-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
124 lines (112 loc) · 2.85 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
version: '3.4'
volumes:
esdata01:
driver: local
services:
web:
build:
context: ./web
ports:
- "${PORT}:80"
volumes:
- ./web/conf.d:/etc/nginx/conf.d:rw,cached
depends_on:
- coordinator
- rssreader
- calendar
- frontend
- tweets
frontend:
build:
context: ./frontend
dockerfile: ../docker/nodejs-yarn.dockerfile
environment:
- SKIP_PREFLIGHT_CHECK=true
- REACT_APP_COORDINATOR=//coordinator.${DEFAULT_HOST}
volumes:
- ./frontend:/app:rw,cached
coordinator:
build:
context: ./coordinator
dockerfile: ../docker/nodejs-npm.dockerfile
environment:
- DEFAULT_HOST=${DEFAULT_HOST}
- KAFKA_HOST=kafka:9092
command: "npm run dev"
depends_on:
- kafka
volumes:
- ./coordinator:/app:rw,cached
- ./.platform/routes.yaml:/app/routes.yaml:ro
rssreader:
build:
context: ./rssreader
dockerfile: ../docker/nodejs-npm.dockerfile
environment:
- ELASTICSEARCH_HOST=http://elasticsearch:9200
command: "npm run dev"
volumes:
- ./rssreader:/app
- ./rssreader/db:/app/db
depends_on:
- elasticsearch
tweets:
build:
context: ./tweets
dockerfile: ../docker/nodejs-npm.dockerfile
command: "npm run start"
volumes:
- ./tweets:/app
environment:
- KAFKA_HOST=kafka:9092
- ELASTICSEARCH_HOST=http://elasticsearch:9200
depends_on:
- kafka
- coordinator
- elasticsearch
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
environment:
- node.name=es01
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- http.cors.enabled=true
- http.cors.allow-origin=*
- http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
- http.cors.allow-credentials=true
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata01:/usr/share/elasticsearch/data
ports:
- "9288:9200"
zookeeper:
image: wurstmeister/zookeeper
#tmpfs: "/datalog"
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
#KAFKA_ADVERTISED_HOST_NAME: 172.19.0.1
#KAFKA_CREATE_TOPICS: "NewUrl:1:1,NewContent:1:1,ClientResponse:1:1"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://_{HOSTNAME_COMMAND}:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
depends_on:
- zookeeper
volumes:
- /var/run/docker.sock
calendar:
build:
context: ./calendar
volumes:
- ./calendar:/var/www/app:rw,cached
depends_on:
- elasticsearch