forked from ELEVATE-Project/mentoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-mentoring.yml
161 lines (158 loc) · 4.57 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
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:9092,PLAINTEXT_HOST://kafka:9093
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: none
redis:
image: 'redis:7.0.0'
restart: 'always'
ports:
- '6379:6379'
networks:
- elevate_net
logging:
driver: none
mentoring:
# update image url with latest one:
image: shikshalokamqa/elevate-mentoring:2.5.6
ports:
- '3000:3000'
command: >
bash -c "npm run db:init && npm run db:seed:all && (echo 'Running nodeee' && nodemon app.js &); (while ! curl -sSf http://mentoring:3000 > /dev/null; do sleep 1; done && echo 'Service is up' && /bin/bash -c 'cd scripts && echo Running script && node psqlFunction.js && node viewsScript.js'); tail -f /dev/null"
environment:
- KAFKA_URL=kafka:9092
- USER_SERIVCE_HOST=http://user:3001
- REDIS_HOST=redis://redis:6379
- DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/elevate-mentoring
- SCHEDULER_SERVICE_HOST=http://scheduler:4000
depends_on:
- kafka
- redis
- citus
networks:
- elevate_net
env_file:
- ${mentoring_env}
user:
# Update with latest image
image: shikshalokamqa/elevate-user:2.5.5
ports:
- '3001:3001'
command: >
bash -c "npm run db:init && npm run db:seed:all && (echo 'Running nodeee' && nodemon app.js &); (while ! curl -sSf http://user:3001 > /dev/null; do sleep 1; done && echo 'Service is up' && /bin/bash -c 'cd scripts && echo Running user service scripts && node insertDefaultOrg.js && node viewsScript.js && node -r module-alias/register uploadSampleCSV.js'); tail -f /dev/null"
environment:
- DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/elevate-user
- KAFKA_URL=kafka:9092
- REDIS_HOST=redis://redis:6379
depends_on:
- kafka
- citus
- redis
networks:
- elevate_net
env_file:
- ${users_env}
notification:
# Update with latest image
image: shikshalokamqa/elevate-notification:2.5
ports:
- '3002:3002'
command: >
bash -c "npm run db:init && nodemon app.js"
environment:
- KAFKA_HOST=kafka:9092
- DEV_DATABASE_URL=postgres://postgres:postgres@citus_master:5432/elevate-notification
depends_on:
- kafka
- citus
networks:
- elevate_net
env_file:
- ${notification_env}
scheduler:
# Update with latest image
image: shikshalokamqa/elevate-scheduler:2.5.2
ports:
- '4000:4000'
command: ['nodemon', '--trace-warnings', 'app.js']
environment:
- KAFKA_URL=kafka:9092
depends_on:
- kafka
- redis
networks:
- elevate_net
env_file:
- ${scheduler_env}
interface:
# Update with latest image
image: shikshalokamqa/elevate-interface:2.5
ports:
- '3567:3567'
command: ['node', '--trace-warnings', 'app.js']
networks:
- elevate_net
env_file:
- ${interface_env}
citus:
image: citusdata/citus:11.2.0
container_name: 'citus_master'
ports:
- 5432:5432
environment: &AUTH
POSTGRES_USER: '${POSTGRES_USER:-postgres}'
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-postgres}'
PGUSER: '${POSTGRES_USER:-postgres}'
PGPASSWORD: '${POSTGRES_PASSWORD:-postgres}'
POSTGRES_DB: 'postgres'
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:
# fbdata:
# logs: