forked from ELEVATE-Project/mentoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-mentoring.yml
227 lines (222 loc) · 6.04 KB
/
docker-compose-mentoring.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
version: '3'
services:
zookeeper:
image: 'bitnami/zookeeper:3.8.0'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
networks:
- elevate_net
volumes:
- zookeeper-data:/bitnami/zookeeper
logging:
driver: none
kafka:
image: 'bitnami/kafka:3.1.0'
ports:
- '9092:9092'
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:9093
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
depends_on:
- zookeeper
networks:
- elevate_net
volumes:
- kafka-data:/bitnami/kafka
logging:
driver: none
mongo:
image: 'mongo:4.1.4'
restart: 'always'
ports:
- '27017:27017'
networks:
- elevate_net
volumes:
- mongo-data:/data/db
logging:
driver: none
redis:
image: 'redis:7.0.0'
restart: 'always'
ports:
- '6379:6379'
networks:
- elevate_net
logging:
driver: none
# redis_bullmq:
# image: 'redis:7.0.0'
# container_name: redis_bullmq
# restart: 'always'
# command: redis-server --appendonly yes --maxmemory-policy noeviction
# ports:
# - '6380:6379'
# networks:
# - elevate_net
# volumes:
# - redis_data:/data
mentoring:
build: './'
image: elevate/mentoring:2.4
volumes:
- ./src/:/var/src
ports:
- '3000:3000'
command: ['nodemon', '--trace-warnings', 'app.js']
environment:
- MONGODB_URL=mongodb://mongo:27017/elevate-mentoring
- KAFKA_URL=kafka:9092
- USER_SERVICE_HOST=http://user:3001
- DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/mentoring-local
- REDIS_HOST=redis://redis:6379
- SCHEDULER_SERVICE_HOST=http://scheduler:4000
depends_on:
- kafka
- mongo
networks:
- elevate_net
user:
build: '../user/'
image: elevate/user:2.4
volumes:
- ../user/src/:/var/src
ports:
- '3001:3001'
command: ['nodemon', '--trace-warnings', 'app.js']
environment:
- MONGODB_URL=mongodb://mongo:27017/elevate-mentoring
- KAFKA_URL=kafka:9092
- REDIS_HOST=redis://redis:6379
- DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/user-local
depends_on:
- kafka
- mongo
- redis
networks:
- elevate_net
notification:
build: '../notification/'
image: elevate/notification:2.4
volumes:
- ../notification/src/:/var/src
ports:
- '3002:3002'
command: ['nodemon', '--trace-warnings', 'app.js']
environment:
- KAFKA_HOST=kafka:9092
- DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/notification-local
depends_on:
- kafka
- mongo
networks:
- elevate_net
scheduler:
build: '../scheduler/'
image: elevate/scheduler:1.0
volumes:
- ../scheduler/src/:/var/src
ports:
- '4000:4000'
command: ['nodemon', '--trace-warnings', 'app.js']
environment:
- KAFKA_URL=kafka:9092
- MONGODB_URL=mongodb://mongo:27017/elevate-scheduler
depends_on:
- kafka
- mongo
- redis
networks:
- elevate_net
interface:
build: '../interface-service/'
image: elevate/interface:1.0
volumes:
- ../interface-service/src/:/var/src
ports:
- '3567:3567'
command: ['node', '--trace-warnings', 'app.js']
networks:
- elevate_net
# master:
# container_name: 'citus_master'
# image: 'citusdata/citus:11.2.0'
# ports: ['${COORDINATOR_EXTERNAL_PORT:-5432}:5432']
# labels: ['com.citusdata.role=Master']
# environment: &AUTH
# POSTGRES_USER: '${POSTGRES_USER:-postgres}'
# POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-postgres}'
# PGUSER: '${POSTGRES_USER:-postgres}'
# PGPASSWORD: '${POSTGRES_PASSWORD:-postgres}'
# POSTGRES_HOST_AUTH_METHOD: '${POSTGRES_HOST_AUTH_METHOD:-trust}'
# networks:
# - elevate_net
# worker:
# image: 'citusdata/citus:11.2.0'
# labels: ['com.citusdata.role=Worker']
# depends_on: [manager]
# environment: *AUTH
# command: '/wait-for-manager.sh'
# volumes:
# - healthcheck-volume:/healthcheck
# networks:
# - elevate_net
# manager:
# container_name: '${COMPOSE_PROJECT_NAME:-citus}_manager'
# image: 'citusdata/membership-manager:0.3.0'
# volumes:
# - '${DOCKER_SOCK:-/var/run/docker.sock}:/var/run/docker.sock'
# - healthcheck-volume:/healthcheck
# depends_on: [master]
# environment: *AUTH
# networks:
# - elevate_net
citus:
image: citusdata/citus:11.2.0
container_name: 'citus_master'
ports:
- 5432:5432
# expose:
# - 5432
# command: >
# bash -c "while ! pg_isready -h localhost -U postgres -q; do sleep 1; done &&
# psql -h localhost -U postgres -d <database_name> -c 'CREATE EXTENSION citus; SELECT create_distributed_table(\"notification_templates\", \"id\");'"
environment: &AUTH
POSTGRES_USER: '${POSTGRES_USER:-postgres}'
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-postgres}'
PGUSER: '${POSTGRES_USER:-postgres}'
PGPASSWORD: '${POSTGRES_PASSWORD:-postgres}'
POSTGRES_DB: 'user-local'
POSTGRES_HOST_AUTH_METHOD: '${POSTGRES_HOST_AUTH_METHOD:-trust}'
POSTGRES_LOG_STATEMENT: 'all' # Enable query logging (set to 'all' for all queries)
networks:
- elevate_net
pgadmin:
image: dpage/pgadmin4
container_name: elevate-pgadmin
restart: always
ports:
- '5500:80'
environment:
- PGADMIN_DEFAULT_PASSWORD=password
networks:
- elevate_net
logging:
driver: none
networks:
elevate_net:
external: false
volumes:
zookeeper-data:
kafka-data:
mongo-data:
redis_data:
healthcheck-volume: