-
Notifications
You must be signed in to change notification settings - Fork 93
/
docker-compose.yml
144 lines (135 loc) · 3.74 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
version: "3.7"
services:
# ------------- Kafka -----------------
zookeeper:
image: wurstmeister/zookeeper
ports:
- "9092:9092"
logging:
driver: none
kafka:
image: wurstmeister/kafka
command: ["wait-for-it.sh", "zookeeper:9092", "--","start-kafka.sh"]
ports:
- "9092:9092"
logging:
driver: none
depends_on:
- zookeeper
environment:
KAFKA_LISTENERS: INTERNAL://kafka:9092
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_ZOOKEEPER_CONNECT: zookeeper:9092
# KAFKA_CREATE_TOPICS: institution
KAFKA_CREATE_GROUP: institutions-group
KAFKA_BROKER_ID: 2
volumes:
- ./wait-for-it.sh:/usr/bin/wait-for-it.sh
- db-data:/var/lib/kafka/data
# ------------- Cassandra -------------
cassandra:
image: "cassandra:3.11.4"
ports:
- "9042:9042"
logging:
driver: none
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- db-data:/var/lib/cassandra/data
# ------------- HMDA Platform ---------
hmda-platform:
image: hmda/hmda-platform
ports:
- "8080:8080"
- "8081:8081"
- "8082:8082"
depends_on:
- kafka
- cassandra
command:
- "wait-for-it.sh"
- "--service kafka:9092"
- "--services cassandra:9042"
environment:
HMDA_RUNTIME_MODE: docker-compose
CASSANDRA_CLUSTER_HOSTS: cassandra:9042
CASSANDRA_CLUSTER_DC: datacenter1
CASSANDRA_CLUSTER_PASSWORD: cassandra
CASSANDRA_CLUSTER_USERNAME: cassandra
CASSANDRA_JOURNAL_KEYSPACE: hmda2_journal
CASSANDRA_SNAPSHOT_KEYSPACE: hmda2_snapshot
KAFKA_CLUSTER_HOSTS: kafka:9092
KAFKA_INSTITUTIONS_TOPIC: institution
KAFKA_SIGN_TOPIC: hmda-sign
volumes:
- ./wait-for-it.sh:/usr/bin/wait-for-it.sh
# ------------- Postgres ---------
pg:
image: postgres
environment:
- POSTGRES_DB=hmda
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- 5432:5432
volumes:
- db-data:/var/lib/postgresql/data
# ------------- Institutions-API ---------
institutions-api:
image: hmda/institutions-api
depends_on:
- kafka
- cassandra
- pg
command:
- "wait-for-it.sh"
- "--service pg:5432"
- "--service kafka:9092"
- "--services cassandra:9042"
environment:
CASSANDRA_CLUSTER_HOSTS: cassandra:9042
CASSANDRA_CLUSTER_PASSWORD:
CASSANDRA_CLUSTER_USERNAME:
CASSANDRA_JOURNAL_KEYSPACE: hmda2_journal
CASSANDRA_SNAPSHOT_KEYSPACE: hmda2_snapshot
CASSANDRA_CLUSTER_DC:
KAFKA_CLUSTER_HOSTS: kafka:9092
KAFKA_INSTITUTIONS_TOPIC: institution
KAFKA_INSTITUTIONS_GROUP: institutions-group
PG_HOST: pg:5432
PG_DATABASE: hmda
PG_USER:
PG_PASSWORD:
volumes:
- ./wait-for-it.sh:/usr/bin/wait-for-it.sh
# ------------- HMDA Analytics ---------
hmda-analytics:
image: hmda/hmda-analytics
depends_on:
- kafka
- cassandra
- pg
command:
- "wait-for-it.sh"
- "--service pg:5432"
- "--service kafka:9092"
- "--services cassandra:9042"
environment:
CASSANDRA_CLUSTER_HOSTS: cassandra:9042
CASSANDRA_CLUSTER_PASSWORD:
CASSANDRA_CLUSTER_USERNAME:
CASSANDRA_JOURNAL_KEYSPACE: hmda2_journal
CASSANDRA_SNAPSHOT_KEYSPACE: hmda2_snapshot
KAFKA_CLUSTER_HOSTS: kafka:9092
KAFKA_INSTITUTIONS_TOPIC: institution
KAFKA_INSTITUTIONS_GROUP: institutions-group
PG_HOST: pg:5432
PG_DATABASE: hmda
PG_USER:
PG_PASSWORD:
volumes:
- ./wait-for-it.sh:/usr/bin/wait-for-it.sh
volumes:
db-data:
driver: local