-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
79 lines (78 loc) · 2.01 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
version: '3'
services:
mongo1:
container_name: mongo1
image: mongo
restart: on-failure
ports:
- "27017:27017"
command: mongod --replSet myReplicaSet --bind_ip localhost,mongo1
# command: mongod --replSet myReplicaSet --bind_ip 0.0.0.0,mongo1
networks:
- mongo-network
mongo2:
container_name: mongo2
image: mongo
restart: on-failure
ports:
- "27018:27017"
command: mongod --replSet myReplicaSet --bind_ip localhost,mongo2
# command: mongod --replSet myReplicaSet --bind_ip 0.0.0.0,mongo2
networks:
- mongo-network
mongo3:
container_name: mongo3
image: mongo
restart: on-failure
ports:
- "27019:27017"
command: mongod --replSet myReplicaSet --bind_ip localhost,mongo3
# command: mongod --replSet myReplicaSet --bind_ip 0.0.0.0,mongo3
networks:
- mongo-network
mongoexpress:
container_name: mongoExpress
image: mongo-express
restart: on-failure
ports:
- "8081:8081"
environment:
- ME_CONFIG_MONGODB_SERVER=mongo1,mongo2,mongo3
- ME_CONFIG_MONGODB_URL="mongodb://writeUser:secret@mongo1:27017,mongo2:27018,mongo3:27019/?replicaSet=myReplicaSet"
# Add your user credentials for authentication
- ME_CONFIG_MONGODB_ADMINUSERNAME=writeUser
- ME_CONFIG_MONGODB_ADMINPASSWORD=secret
networks:
- mongo-network
elasticsearch:
container_name: elasticsearch
image: elasticsearch:8.11.1
restart: on-failure
ports:
- "9200:9200"
networks:
- mongo-network
kibana:
container_name: kibana
image: kibana:8.11.1
restart: on-failure
ports:
- "5601:5601"
networks:
- mongo-network
monstache:
container_name: monstache
image: rwynn/monstache
command: -f /config/config.toml
restart: on-failure
volumes:
- ./monstache-config:/config
networks:
- mongo-network
# networks:
# mongo-network:
# external: true
# driver: bridge
networks:
mongo-network:
driver: bridge