forked from ELEVATE-Project/mentoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
213 lines (210 loc) · 5.39 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
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
version: '3'
services:
zookeeper:
image: 'confluentinc/cp-zookeeper:7.3.0'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOOKEEPER_CLIENT_PORT=2181
- ZOOKEEPER_TICK_TIME=2000
networks:
- elevate_net
logging:
driver: none
kafka:
image: 'confluentinc/cp-kafka:7.3.0'
ports:
- '9092:9092'
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zookeeper
networks:
- elevate_net
logging:
driver: gelf
options:
gelf-address: 'udp://0.0.0.0:12201'
tag: 'kafka-logs'
mongo:
image: 'mongo:4.1.4'
restart: 'always'
command:
- '--logpath'
- '/var/log/mongodb/mongod.log'
ports:
- '27017:27017'
networks:
- elevate_net
volumes:
- mongo-data:/data/db
- logs:/var/log/mongodb
redis:
image: 'redis:7.0.0'
restart: 'always'
expose:
- '6379'
networks:
- elevate_net
# depends_on:
# - graylog
logging:
driver: gelf
options:
gelf-address: 'udp://0.0.0.0:12201'
tag: 'redis-logs'
mentoring:
image: shikshalokamqa/elevate-mentoring:2.4
ports:
- '3000:3000'
command: ['nodemon', 'app.js']
environment:
- MONGODB_URL=mongodb://mongo:27017/elevate-mentoring
- KAFKA_URL=kafka:9092
- USER_SERIVCE_HOST=http://user:3001
- REDIS_HOST=redis://redis:6379
depends_on:
- kafka
- mongo
- redis
networks:
- elevate_net
env_file:
- ${mentoring_env}
user:
image: shikshalokamqa/elevate-user:2.4
ports:
- '3001:3001'
command: ['nodemon', 'app.js']
environment:
- MONGODB_URL=mongodb://mongo:27017/elevate-user
- KAFKA_URL=kafka:9092
- REDIS_HOST=redis://redis:6379
depends_on:
- kafka
- mongo
- redis
networks:
- elevate_net
env_file:
- ${users_env}
notification:
image: shikshalokamqa/elevate-notification:2.4
ports:
- '3002:3002'
command: ['nodemon', 'app.js']
environment:
- KAFKA_HOST=kafka:9092
depends_on:
- kafka
networks:
- elevate_net
env_file:
- ${notification_env}
scheduler:
image: shikshalokamqa/elevate-scheduler:2.4
ports:
- '4000:4000'
command: ['nodemon', 'app.js']
environment:
- KAFKA_URL=kafka:9092
- MONGODB_URL=mongodb://mongo:27017/elevate-scheduler
env_file:
- ${scheduler_env}
depends_on:
- kafka
- mongo
networks:
- elevate_net
#The below services can be disable safely. Only enable if graylog service is needed.
# elasticsearch:
# image: 'docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2'
# environment:
# - http.host=0.0.0.0
# - transport.host=localhost
# - network.host=0.0.0.0
# - ES_JAVA_OPTS=-Dlog4j2.formatMsgNoLookups=true -Xms512m -Xmx512m
# ulimits:
# memlock:
# soft: -1
# hard: -1
# deploy:
# resources:
# limits:
# memory: 1g
# networks:
# - elevate_net
# graylog:
# image: 'graylog/graylog:5.0'
# environment:
# - GRAYLOG_PASSWORD_SECRET=somepasswordpepper
# - >-
# GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
# - 'GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/'
# entrypoint: '/usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh'
# networks:
# - elevate_net
# restart: always
# depends_on:
# - mongo
# - elasticsearch
# ports:
# # Graylog web interface and REST API
# - 9000:9000
# #filebeat
# - 5044:5044
# # GELF TCP
# - 12201:12201
# # GELF UDP
# - 12201:12201/udp
# filebeat:
# container_name: filebeat
# hostname: filebeat
# user: root
# image: docker.elastic.co/beats/filebeat:8.5.3
# volumes:
# #Mount the filebeat configuration so users can make edit
# - ./filebeat.yml:/usr/share/filebeat/filebeat.yml
# #Named volume fsdata. This is used to persist the registry file between restarts, so to avoid data duplication
# - fbdata:/usr/share/filebeat/data/
# - logs:/info/logs
# - type: bind
# source: ../user/src/user.log
# target: /usr/share/filebeat/user.log
# read_only: true
# - type: bind
# source: ../notification/src/notification.log
# target: /usr/share/filebeat/notification.log
# read_only: true
# - type: bind
# source: ./src/mentoring.log
# target: /usr/share/filebeat/mentoring.log
# read_only: true
# - type: bind
# source: ../scheduler/src/scheduler.log
# target: /usr/share/filebeat/scheduler.log
# read_only: true
# command: filebeat -strict.perms=false
# restart: on-failure
# networks:
# - elevate_net
# depends_on:
# - mongo
# - elasticsearch
# - mentoring
# - user
networks:
elevate_net:
external: false
volumes:
zookeeper-data:
kafka-data:
mongo-data:
fbdata:
logs: