This repository has been archived by the owner on Aug 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.yml
159 lines (147 loc) · 3.43 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
version: '3.1'
services:
postgres:
image: postgres:9.6.5
environment:
- POSTGRES_USER=pricewars
- POSTGRES_PASSWORD=1337
- POSTGRES_DB=marketplace
redis:
image: redis:latest
ports:
- "6379:6379"
zookeeper:
image: zookeeper:3.4
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka:1.1.0
ports:
- "9092:9092"
- "9093:9093"
environment:
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9092,OUTSIDE://localhost:9093
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LOG_DIRS: /kafka/kafka-logs
KAFKA_LOG_RETENTION_HOURS: -1
LOG4J_LOGGER_KAFKA: WARN
LOG4J_LOGGER_ORG_APACHE_ZOOKEEPER: WARN
depends_on:
- zookeeper
kafka-reverse-proxy:
build: ./kafka-reverse-proxy
ports:
- "8001:8001"
command: ["python3", "-u", "LoggerApp.py", "--kafka_url", "kafka:9092"]
depends_on:
- kafka
links:
- kafka
flink-taskmanager:
build:
context: ./analytics
dockerfile: Dockerfile.flink-taskmanager
expose:
- "6121"
- "6122"
environment:
- JOB_MANAGER_RPC_ADDRESS=flink-jobmanager
- TASK_MANAGER_NUMBER_OF_TASK_SLOTS=8
# disable terminal output of this container
logging:
driver: "none"
command: taskmanager
depends_on:
- flink-jobmanager
links:
- flink-jobmanager
flink-jobmanager:
build:
context: ./analytics
dockerfile: Dockerfile.flink-jobmanager
ports:
- "8081:8081"
expose:
- "6123"
environment:
- KAFKA_URL=kafka:9092
- JOB_MANAGER_RPC_ADDRESS=flink-jobmanager
depends_on:
- kafka
links:
- kafka
management-ui:
build: ./management-ui
ports:
- "80:80"
depends_on:
- kafka-reverse-proxy
- marketplace
- producer
marketplace:
build: ./marketplace
ports:
- "8080:8080"
environment:
- POSTGRES_USER=pricewars
- POSTGRES_PASSWORD=1337
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=marketplace
- KAFKA_URL=kafka:9092
- REDIS_HOST=redis
- PRICEWARS_PRODUCER_URL=http://producer:3050
depends_on:
- postgres
- redis
- kafka
- producer
links:
- postgres
- redis
- kafka
- producer
producer:
build: ./producer
ports:
- "3050:3050"
environment:
- KAFKA_URL=kafka:9092
depends_on:
- kafka
consumer:
build: ./consumer
ports:
- "3000:3000"
environment:
- RAILS_ENV=development
- PRICEWARS_MARKETPLACE_URL=http://marketplace:8080
command: "bash -c 'rm -rf /consumer/tmp/pids/server.pid; bundle exec rails s -b 0.0.0.0'"
depends_on:
- marketplace
links:
- marketplace
merchant:
build: ./merchant
restart: on-failure:5
ports:
- "5003:5003"
command: python3 -u merchant.py --port 5003 --strategy two_bound --marketplace http://marketplace:8080 --producer http://producer:3050
volumes:
- ./merchant:/merchant
depends_on:
- producer
- marketplace
links:
- producer
- marketplace
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.47.0/24