-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
184 lines (167 loc) · 4.81 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
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
# vim: syntax=yaml textwidth=120 expandtab tabstop=2 softtabstop=2 shiftwidth=2 autoindent
# Docker compose file for a full-featured SmartSLA architecture
version: '3.7'
volumes:
mongodb01:
driver: local
elasticsearch01:
driver: local
ldap01:
driver: local
ldap02:
driver: local
rabbitmq01:
driver: local
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.99.0.0/16
services:
reverse-proxy:
image: traefik:1.7-alpine
restart: always
ports:
- 80:80
volumes:
- ./assets/conf/traefik/traefik.toml:/etc/traefik/traefik.toml:ro
docker-socket:
image: tecnativa/docker-socket-proxy
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- CONTAINERS=1
mongodb:
image: mongo:3.2
restart: always
command: mongod --smallfiles
volumes:
- mongodb01:/data/db
ldap:
image: linagora/openpaas-ldap:1.1.1
tty: true
stdin_open: true
hostname: ldap
command: --copy-service --loglevel debug
volumes:
- ldap01:/var/lib/ldap
- ldap02:/etc/ldap/slapd.d
ports:
- 1389:389
redis:
image: redis:5.0.1-stretch
rabbitmq:
image: rabbitmq:3.6.5-management
volumes:
- rabbitmq01:/var/lib/rabbitmq
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
restart: always
volumes:
- elasticsearch01:/usr/share/elasticsearch/data
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- ELASTICSEARCH_INIT_TIMEOUT=120
- CLUSTER_NAME=openpaas
- HTTP_ENABLE=false
- NODE_MASTER=true
- NETWORK_HOST=0.0.0.0
- NODE_DATA=true
smartsla-frontend:
image: smartsla/smartsla-frontend:1.6
restart: always
volumes:
- ./assets/conf/smartsla-frontend/openpaas.js:/var/www/smartsla/env/openpaas.js
depends_on:
- mongodb
- esn
labels:
- "traefik.enable=true"
- "traefik.openpaas.frontend.rule=Host:frontend.smartsla.local"
esn:
image: smartsla/smartsla-backend:1.6
restart: always
healthcheck:
test: ["CMD", "curl", "-s", "-f", "http://localhost:8080/api/monitoring"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
volumes:
- ./assets/conf/esn/provision.sh:/var/www/docker/scripts/provision.sh
- ./assets/jwt-keys/private.pem:/var/www/docker/config/jwt/private
- ./assets/jwt-keys/public.pem:/var/www/docker/config/jwt/public
depends_on:
- mongodb
- elasticsearch
- rabbitmq
environment:
- DOCKER_IP=127.0.0.1
- GENERATE_DB_CONFIG_FROM_ENV=true
- PROVISION=true
- CONFIG_DIR=/var/www/docker/config
- MONGO_HOST=mongodb
- MONGO_PORT=27017
- MONGO_DBNAME=esn_docker
- MONGO_TIMEOUT=100000
- REDIS_HOST=redis
- REDIS_PORT=6379
- AMQP_HOST=rabbitmq
- AMQP_PORT=5672
- AMQP_PROTOCOL=amqp
- AMQP_USERNAME=guest
- AMQP_PASSWORD=guest
- WEB_HOST=backend.smartsla.local
- WEB_PORT=
- ELASTICSEARCH_HOST=elasticsearch
- ELASTICSEARCH_PORT=9200
- ELASTICSEARCH_INIT_TIMEOUT=120
- MAIL_BROWSER=false
labels:
- "traefik.enable=true"
- "traefik.openpaas.frontend.rule=Host:backend.smartsla.local"
- "traefik.port=8080"
esn-init:
image: linagora/openpaas-esncli:1.6
environment:
- ESN_CLI_PASSWORD=secret
- ESN_CLI_URL=http://esn:8080
- ESN_HOST=esn
- ESN_PORT=8080
- LDAP_SEARCH_BASE=ou=users,dc=openpaas,dc=org
- OPENPAAS_BIND_DN=cn=openpaas,ou=accounts,dc=openpaas,dc=org
- OPENPAAS_BIND_PW=openpaas
- WAITFORIT_TIMEOUT=120
volumes:
- ./assets/conf/esn-init/init.esn.sh:/init.esn.sh
command: /init.esn.sh
depends_on:
- esn
ldap-init:
image: linagora/openpaas-ldap-init:1.2.2
# build: ../openpaas-ldap-init-dockerfile
depends_on:
- ldap
environment:
# init config for dev (you must override them in every mode)
- LDAP_HOST=ldap
- LDAP_PORT=389
- LDAP_BIND_PW=adminopenpaas
# lemonldap config for dev (you must override them in every mode)
- TEMPLATE_LDAP_BIND_DN=cn=lemonldap,ou=accounts,dc=openpaas,dc=org
- TEMPLATE_LDAP_BIND_PW=adminopenpaas
- TEMPLATE_LDAP_URI=ldap://ldap:389
# lemonldap config for dev (no need to override them in production mode)
- OPENPAAS_BIND_DN=cn=openpaas,ou=accounts,dc=openpaas,dc=org
- OPENPAAS_BIND_PW=openpaas
- LINSHARE_BIND_DN=cn=linshare,ou=accounts,dc=openpaas,dc=org
- LINSHARE_BIND_PW=linshare
- LOAD_USERS=1
- DEBUG=0
volumes:
- ./assets/conf/ldap-init/users.ldif:/linagora/data/ldifs/custom/users.ldif