-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.multi-node.yml
102 lines (96 loc) · 2.4 KB
/
docker-compose.multi-node.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
version: '2.1'
services:
prism-mongo:
container_name: prism-mongo
image: mongo
restart: always
healthcheck:
test: mongo --eval 'db.getCollectionNames()'
interval: 10s
timeout: 2s
retries: 10
volumes:
- prism-mongodb-vol:/data/db
ports:
- 127.0.0.1:27017:27017
networks:
- services-tier
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:6.7.1
networks:
- services-tier
ports:
- 127.0.0.1:9200:9200
healthcheck:
test: curl http://127.0.0.1:9200/_cat/health
environment:
'discovery.type': 'single-node'
'bootstrap.memory_lock': 'true'
'ES_JAVA_OPTS': '-Xms512m -Xmx512m'
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- prism-elastic-vol:/usr/share/elasticsearch/data
prism-node:
container_name: prism-node
restart: always
depends_on:
prism-mongo:
condition: service_healthy
build:
context: .
dockerfile: Dockerfile
networks:
- services-tier
ports:
- $GLS_CONNECTOR_PRISM_HOST:$GLS_CONNECTOR_PRISM_PORT:$GLS_CONNECTOR_PRISM_PORT
- $GLS_METRICS_PRISM_HOST:$GLS_METRICS_PRISM_PORT:$GLS_METRICS_PRISM_PORT
environment:
- NODE_OPTIONS=$GLS_PRISM_NODE_OPTIONS
- GLS_ENABLE_BLOCK_HANDLE=true
- GLS_ENABLE_PUBLIC_API=false
- GLS_CONNECTOR_PORT=$GLS_CONNECTOR_PRISM_PORT
env_file:
- .env
prism-api-node:
container_name: prism-api-node
restart: always
depends_on:
prism-mongo:
condition: service_healthy
elasticsearch:
condition: service_healthy
build:
context: .
dockerfile: Dockerfile
networks:
- services-tier
ports:
- $GLS_CONNECTOR_HOST:$GLS_CONNECTOR_PORT:$GLS_CONNECTOR_PORT
- $GLS_METRICS_HOST:$GLS_METRICS_PORT:$GLS_METRICS_PORT
environment:
- GLS_ENABLE_BLOCK_HANDLE=false
- GLS_ENABLE_PUBLIC_API=true
env_file:
- .env
mongodb-exporter:
container_name: mongodb-exporter
image: cyberway/mongodb-exporter:v0.6.2
restart: always
depends_on:
prism-mongo:
condition: service_healthy
ports:
- 9216:9216
environment:
- MONGODB_URI=mongodb://prism-mongo:27017
networks:
- services-tier
volumes:
prism-mongodb-vol:
prism-elastic-vol:
networks:
services-tier: