forked from Minds/minds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
209 lines (185 loc) · 4.24 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
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
# Main docker-compose
# Suited for containerized SSR server.
version: "2.2"
services:
## WEB SERVER / GATEWAY
nginx:
build:
context: ./containers/nginx
dockerfile: ./Dockerfile.dev-ssr
mem_limit: 512MB
depends_on:
- php-fpm
networks:
- app
ports:
- "8080:80"
environment:
- UPSTREAM_ENDPOINT
volumes:
- ./front/:/var/www/Minds/front:cached
## APP ENGINE
php-fpm:
build:
context: ./engine
dockerfile: ./containers/php-fpm/Dockerfile.dev
mem_limit: 512MB
depends_on:
- cassandra
- mongo
- elasticsearch
- rabbitmq
- redis
networks:
- app
volumes:
- ./front/:/var/www/Minds/front:cached
- ./engine/:/var/www/Minds/engine:cached
- keys:/.dev
runners:
build:
context: ./engine
dockerfile: ./containers/php-runners/Dockerfile
depends_on:
- cassandra
- elasticsearch
- rabbitmq
- redis
networks:
- app
volumes:
- ./front/:/var/www/Minds/front:cached
- ./engine/:/var/www/Minds/engine:cached
- keys:/.dev
sockets:
image: minds/sockets
environment:
- PORT=3030
- REDIS_HOST=redis
- REDIS_PORT=6379
- JWT_SECRET=<!!! set this to jwt-token in your engine/settings.php !!!>
- CASSANDRA_SERVERS=cassandra
- CASSANDRA_KEYSPACE=minds
networks:
- app
depends_on:
- redis
- cassandra
ports:
- 8010:3030
## DATABASES
cassandra:
image: cassandra:3.11.1
environment:
- CASSANDRA_START_RPC=true
- MAX_HEAP_SIZE=768M
- HEAP_NEWSIZE=512M
networks:
- app
mem_limit: 1024MB
volumes:
- cassandra-data:/var/lib/cassandra
healthcheck:
test: "cqlsh -e 'DESC TABLE system.batches'"
retries: 10
timeout: 5s
interval: 15s
mongo:
image: mongo:3.4
networks:
- app
elasticsearch:
image: elasticsearch:6.6.2
entrypoint: /set-permissions-and-start.sh
mem_limit: 512MB # keep an eye
ulimits:
nproc: 65536
memlock:
soft: 65536
hard: 65536
nofile:
soft: 65536
hard: 65536
environment:
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
networks:
- app
ports:
- "9200:9200"
volumes:
- ./containers/elasticsearch/set-permissions-and-start.sh:/set-permissions-and-start.sh:cached
- elasticsearch-data:/usr/share/elasticsearch/data
## CACHE
redis:
image: redis:4.0-alpine
mem_limit: 100MB # keep an eye
networks:
- app
## QUEUE
rabbitmq:
image: rabbitmq:3.6-alpine
networks:
- app
## INSTALLATION ARTIFACTS
installer:
build:
context: ./engine
dockerfile: ./containers/installer/Dockerfile
networks:
- app
volumes:
- ./front/:/var/www/Minds/front:delegated
- ./engine/:/var/www/Minds/engine:delegated
- keys:/.dev
depends_on:
cassandra:
condition: service_healthy
elasticsearch-legacy:
image: elasticsearch:5.6-alpine
entrypoint: /clear-data-and-start.sh
environment:
- "xpack.security.enabled=false"
- "http.host=0.0.0.0"
- "transport.host=127.0.0.1"
networks:
- app
ports:
- "9200:9200"
volumes:
- ./containers/elasticsearch-legacy/clear-data-and-start.sh:/clear-data-and-start.sh:cached
- elasticsearch-data:/usr/share/elasticsearch/data
elasticsearch-legacy-provisioner:
build:
context: ./containers/elasticsearch-provisioner
entrypoint: sh /provisioner/provision-elasticsearch-legacy.sh elasticsearch-legacy
networks:
- app
depends_on:
- elasticsearch-legacy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
elasticsearch-provisioner:
build:
context: ./containers/elasticsearch-provisioner
networks:
- app
depends_on:
- elasticsearch
## UTILITIES
kibana:
image: docker.elastic.co/kibana/kibana-oss:6.6.2
depends_on:
- elasticsearch
environment:
ELASTICSEARCH_URL: http://minds_elasticsearch_1:9200
networks:
- app
ports:
- "5601:5601"
volumes:
cassandra-data:
elasticsearch-data:
keys:
networks:
app:
driver: "bridge"