forked from OscarGarciaPeinado/mlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·146 lines (136 loc) · 3.47 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
version: '3'
services:
mlab_zoo1:
image: zookeeper
container_name: mlab_zoo1
restart: always
hostname: mlab_zoo1
networks:
- nginx-proxy
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=mlab_zoo1:2888:3888 server.2=mlab_zoo2:2888:3888 server.3=mlab_zoo3:2888:3888
mlab_zoo2:
image: zookeeper
container_name: mlab_zoo2
restart: always
hostname: mlab_zoo2
networks:
- nginx-proxy
ports:
- 2182:2181
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=mlab_zoo1:2888:3888 server.2=mlab_zoo2:2888:3888 server.3=mlab_zoo3:2888:3888
mlab_zoo3:
image: zookeeper
container_name: mlab_zoo3
restart: always
hostname: mlab_zoo3
networks:
- nginx-proxy
ports:
- 2183:2181
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=mlab_zoo1:2888:3888 server.2=mlab_zoo2:2888:3888 server.3=mlab_zoo3:2888:3888
mlab_mongo:
image: mongo
container_name: mlab_mongo
networks:
- nginx-proxy
ports:
- "27017:27017"
depends_on:
- mlab_zoo1
- mlab_zoo2
- mlab_zoo3
mlab_init_mongo:
image: mongo
container_name: mlab_init_mongo
working_dir: /var/tmp
environment:
DATABASE_MAME: "mlab"
MLAB_MONGO_HOST: mlab_mongo
volumes:
- ./bin/:/var/tmp
- ./var/asserts/mlab/:/var/tmp/mlab
command: [./wait-for-mongo.sh]
networks:
- nginx-proxy
depends_on:
- mlab_mongo
mlab_worker:
build:
context: worker
dockerfile: Dockerfile
args:
DATABASE_NAME: "mlab"
MLAB_MONGO_URI: "mongodb://mlab_mongo:27017/?readPreference=primary"
MLAB_ZOOKEEPER_URI: "mlab_zoo1:2181"
PORT: 9090
container_name: mlab_worker
environment:
DATABASE_NAME: "mlab"
MLAB_MONGO_URI: "mongodb://mlab_mongo:27017/?readPreference=primary"
MLAB_ZOOKEEPER_URI: "mlab_zoo1:2181"
MLAB_MAIL_SERVER: "${MLAB_MAIL_SERVER}"
MLAB_REPLY_USER: "${MLAB_REPLY_USER}"
MLAB_REPLY_PASS: "${MLAB_REPLY_PASS}"
WORKER_INSTANCES: 2
PORT: 9090
ports:
- "9090:9090"
depends_on:
- mlab_init_mongo
networks:
- nginx-proxy
mlab_nginx:
image: nginx:latest
container_name: mlab_nginx
depends_on:
- mlab_worker
expose:
- "80"
ports:
- "80:80"
volumes:
- ./worker/etc/nginx:/etc/nginx/conf.d
networks:
- nginx-proxy
mlab_dashboard:
build:
context: dashboard
dockerfile: Dockerfile
args:
DATABASE_NAME: "mlab"
MLAB_MONGO_URI: "mongodb://mlab_mongo:27017/?readPreference=primary"
MLAB_ZOOKEEPER_URI: "mlab_zoo1:2181"
LDAP_EDIT_GROUPS: "${LDAP_EDIT_GROUPS}"
LDAP_PASS: "${LDAP_PASS}"
LDAP_DN: "${LDAP_DN}"
LDAP_BASE: "${LDAP_BASE}"
LDAP_EDIT_GROUPS: "${LDAP_EDIT_GROUPS}"
LDAP_URI: "${LDAP_URI}"
PORT: 5000
WORKER_PORT: 9090
container_name: mlab_dashboard
ports:
- "5000:5000"
networks:
- nginx-proxy
environment:
DATABASE_NAME: "mlab"
MLAB_MONGO_URI: "mongodb://mlab_mongo:27017/?readPreference=primary"
MLAB_ZOOKEEPER_URI: "mlab_zoo1:2181"
DASHBOARD_TITLE: "MLAB"
LDAP_URI: "${LDAP_URI}"
WORKER_INSTANCES: 1
PORT: 5000
depends_on:
- mlab_worker
networks:
nginx-proxy:
driver: bridge