forked from joao-alegria/netor
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
312 lines (295 loc) · 7.68 KB
/
docker-compose.yaml
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# @Author: Rafael Direito
# @Date: 2022-08-19 16:06:31
# @Last Modified by: Rafael Direito
# @Last Modified time: 2022-08-19 18:50:57
version: "3.6"
services:
rabbitmq:
image: 'rabbitmq:3.6-management-alpine'
restart: always
ports:
- '5672:5672'
- '15672:15672'
environment:
# The location of the RabbitMQ server. "amqp" is the protocol;
# "rabbitmq" is the hostname. Note that there is not a guarantee
# that the server will start first! Telling the pika client library
# to try multiple times gets around this ordering issue.
AMQP_URL: 'amqp://rabbitmq?connection_attempts=5&retry_delay=5'
RABBITMQ_DEFAULT_USER: "admin"
RABBITMQ_DEFAULT_PASS: "admin"
volumes:
- thesisRabbitVolume:/var/lib/rabbitmq
postgres:
image: postgres:12.2-alpine
restart: always
volumes:
- thesisPostgresVolume:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
ports:
- 5432:5432
redis:
image: "redis:alpine"
restart: always
command: redis-server --requirepass netorRedisPassword
ports:
- "6379:6379"
volumes:
- thesisRedisVolume:/var/lib/redis
- thesisRedisDataVolume:/data
- ./redis.conf:/usr/local/etc/redis/redis.conf
environment:
- REDIS_REPLICATION_MODE=master
mongo1:
image: docker.io/bitnami/mongodb-sharded:4.2
hostname: mongo1
environment:
- MONGODB_ADVERTISED_HOSTNAME=mongo1
- MONGODB_SHARDING_MODE=mongos
- MONGODB_MONGOS_HOST=mongo1
- MONGODB_CFG_PRIMARY_HOST=mongodb-cfg
- MONGODB_CFG_REPLICA_SET_NAME=cfgreplicaset
- MONGODB_REPLICA_SET_KEY=replicasetkey123
- MONGODB_ROOT_PASSWORD=root
ports:
- "27017:27017"
secondary_mongo1:
image: docker.io/bitnami/mongodb-sharded:4.2
environment:
- MONGODB_ADVERTISED_HOSTNAME=secondary_mongo1
- MONGODB_SHARDING_MODE=shardsvr
- MONGODB_MONGOS_HOST=mongo1
- MONGODB_ROOT_PASSWORD=root
- MONGODB_USERNAME=catalogues
- MONGODB_PASSWORD=catalogues
- MONGODB_DATABASE=catalogues
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_REPLICA_SET_KEY=replicasetkey123
- MONGODB_REPLICA_SET_NAME=shard0
volumes:
- 'shard0_data:/bitnami'
mongodb-cfg:
image: docker.io/bitnami/mongodb-sharded:4.2
volumes:
- 'cfg_data:/bitnami'
environment:
- MONGODB_ADVERTISED_HOSTNAME=mongodb-cfg
- MONGODB_SHARDING_MODE=configsvr
- MONGODB_ROOT_PASSWORD=root
- MONGODB_USERNAME=catalogues
- MONGODB_PASSWORD=catalogues
- MONGODB_DATABASE=catalogues
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_REPLICA_SET_KEY=replicasetkey123
- MONGODB_REPLICA_SET_NAME=cfgreplicaset
netor_up_nginx:
image: nginx:latest
restart: always
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 8000:80
netor_coordinator:
image: netor/coordinator
restart: always
depends_on:
- postgres
- rabbitmq
ports:
- '5000:5000'
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASS: "postgres"
POSTGRES_DB: "vsLCM"
POSTGRES_IP: postgres
APP_SECRET: "tenantManager"
RABBIT_USER: "admin"
RABBIT_PASS: "admin"
RABBIT_IP: rabbitmq
IDP_IP: netor_tenant
CATALOGUE_IP: netor_catalogue
DOMAIN_IP: netor_domain
ENVIRONMENT: prod
DNS_API_BASE_ENDPOINT: "http://pdns:8081/api"
DNS_API_KEY: "secret"
netor_domain:
image: netor/domain
restart: always
depends_on:
- postgres
- rabbitmq
ports:
- '5001:5001'
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASS: "postgres"
POSTGRES_DB: "vsDomain"
POSTGRES_IP: postgres
APP_SECRET: "tenantManager"
RABBIT_USER: "admin"
RABBIT_PASS: "admin"
RABBIT_IP: rabbitmq
IDP_IP: netor_tenant
ENVIRONMENT: prod
netor_manager:
image: netor/manager
restart: always
depends_on:
- redis
- rabbitmq
ports:
- '5555:5555'
environment:
APP_SECRET: "tenantManager"
RABBIT_USER: "admin"
RABBIT_PASS: "admin"
RABBIT_IP: rabbitmq
REDIS_HOST: redis
ENVIRONMENT: prod
netor_placement:
image: netor/placement
restart: always
depends_on:
- redis
- rabbitmq
environment:
RABBIT_USER: "admin"
RABBIT_PASS: "admin"
RABBIT_IP: rabbitmq
REDIS_HOST: redis
ENVIRONMENT: prod
netor_tenant:
image: netor/tenant
restart: always
depends_on:
- postgres
- rabbitmq
ports:
- '5002:5002'
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASS: "postgres"
POSTGRES_DB: "vsTenant"
POSTGRES_IP: postgres
APP_SECRET: "tenantManager"
RABBIT_USER: "admin"
RABBIT_PASS: "admin"
RABBIT_IP: rabbitmq
ENVIRONMENT: prod
netor_catalogue:
image: netor/catalogue
restart: always
ports:
- 5010:5010
depends_on:
- mongo1
environment:
APPLICATION_NAME: catalogues
MONGO_USERNAME: catalogues
MONGO_PASSWORD: catalogues
MONGO_URL: mongo1
MONGO_DB: catalogues
SECRET_KEY: tenantManager
RABBIT_HOST: rabbitmq
RABBIT_USERNAME: admin
RABBIT_PASSWORD: admin
IDP_IP: netor_tenant
IDP_PORT: 5002
IDP_ENDPOINT: /validate
ENVIRONMENT: prod
# DNS SD
db_dns:
image: mariadb:latest
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=powerdnsadmin
- MYSQL_USER=pdns
- MYSQL_PASSWORD=mypdns
ports:
- 3306:3306
restart: always
volumes:
- /pda-mysql:/var/lib/mysql
pdns:
#build: pdns
image: pschiffe/pdns-mysql
hostname: pdns
domainname: computingforgeeks.com
restart: always
depends_on:
- db_dns
links:
- "db_dns:mysql"
ports:
- "9000:53"
- "9000:53/udp"
- "8081:8081"
environment:
- PDNS_gmysql_host=db_dns
- PDNS_gmysql_port=3306
- PDNS_gmysql_user=pdns
- PDNS_gmysql_dbname=powerdnsadmin
- PDNS_gmysql_password=mypdns
- PDNS_master=yes
- PDNS_api=yes
- PDNS_api_key=secret # Todo - Update on deployment
- PDNSCONF_API_KEY=secret # Todo - Update on deployment
- PDNS_webserver=yes
- PDNS_webserver-allow-from=0.0.0.0/0
- PDNS_webserver_address=0.0.0.0
- PDNS_webserver_password=secret2 # Todo - Update on deployment
- PDNS_version_string=anonymous
- PDNS_default_ttl=1500
- PDNS_allow_notify_from=0.0.0.0
- PDNS_allow_axfr_ips=127.0.0.1
web_app:
image: ngoduykhanh/powerdns-admin:latest
container_name: powerdns_admin
ports:
- "8080:80"
depends_on:
- db_dns
restart: always
links:
- db_dns:mysql
- pdns:pdns
logging:
driver: json-file
options:
max-size: 50m
environment:
- SQLALCHEMY_DATABASE_URI=mysql://pdns:mypdns@db_dns/powerdnsadmin
- GUNICORN_TIMEOUT=60
- GUNICORN_WORKERS=2
- GUNICORN_LOGLEVEL=DEBUG
# netor_portal:
# image: netor/portal
# restart: always
# ports:
# - '4200:4200'
# environment:
# NETOR_ENDPOINT: netor_up_nginx
volumes:
thesisPostgresVolume:
external: false
thesisRabbitVolume:
external: false
thesisRedisVolume:
external: false
thesisRedisDataVolume:
external: false
#thesisMongo1ConfigVolume:
#external: false
#thesisMongo1DataVolume:
#external: false
#driver:
#thesisMongo2ConfigVolume:
#external: false
shard0_data:
driver: local
cfg_data:
driver: local
#thesisMongo3DataVolume:
#external: false