-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
296 lines (277 loc) · 7.93 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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
services:
app:
build:
context: docker-compose/app
dockerfile: Dockerfile
image: keystone.guru
container_name: keystone.guru-app
depends_on:
- db
- db-combatlog
- redis
restart: no
working_dir: /var/www/
volumes:
- ./:/var/www
- ./docker-compose/app/usr/local/etc/php/conf.d/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- ~/.ssh:/root/.ssh
networks:
- keystone.guru
cron:
build:
context: docker-compose/cron
dockerfile: Dockerfile
image: keystone.guru-cron
container_name: keystone.guru-cron
depends_on:
- db
- db-combatlog
- redis
restart: no
working_dir: /var/www/
volumes:
- ./:/var/www
- ./docker-compose/app/usr/local/etc/php/conf.d/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- ~/.ssh:/root/.ssh
networks:
- keystone.guru
horizon:
build:
context: docker-compose/app
dockerfile: Dockerfile
image: keystone.guru
container_name: keystone.guru-horizon
depends_on:
- db
- db-combatlog
- redis
restart: no
working_dir: /var/www/
entrypoint: /usr/local/bin/php artisan horizon
volumes:
- ./:/var/www
networks:
- keystone.guru
environment:
- "APP_URL=http://nginx"
laravel-echo-server:
build:
context: docker-compose/laravel-echo-server
dockerfile: Dockerfile
image: laravel-echo-server
container_name: keystone.guru-laravel-echo-server
depends_on:
- redis
restart: no
ports:
- "6001:6001"
volumes:
- ./:/app
networks:
- keystone.guru
db:
image: mysql:5.7
container_name: keystone.guru-db
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
SERVICE_TAGS: dev
SERVICE_NAME: mysql
ports:
- "34006:3306"
command:
- '--default-authentication-plugin=mysql_native_password'
volumes:
- ./docker-compose/mysql:/var/lib/mysql
- ./docker-compose/data:/tmp/data
networks:
- keystone.guru
db-combatlog:
image: mysql:5.7
container_name: keystone.guru-db-combatlog
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_COMBATLOG_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_COMBATLOG_PASSWORD}
MYSQL_PASSWORD: ${DB_COMBATLOG_PASSWORD}
MYSQL_USER: ${DB_COMBATLOG_USERNAME}
SERVICE_TAGS: dev
SERVICE_NAME: mysql
ports:
- "34007:3306"
command:
- '--default-authentication-plugin=mysql_native_password'
volumes:
- ./docker-compose/mysql-combatlog:/var/lib/mysql
- ./docker-compose/data:/tmp/data
networks:
- keystone.guru
nginx:
image: nginx:alpine
container_name: keystone.guru-nginx
restart: unless-stopped
depends_on:
# It complains about php-fpm not being there if this is not running first
- app
- laravel-echo-server
- php-deployer
ports:
- "8008:80"
volumes:
- ./:/var/www
- ./docker-compose/nginx:/etc/nginx/conf.d/
networks:
- keystone.guru
redis:
image: redis:alpine
container_name: keystone.guru-redis
command: --port 6380
ports:
- "6380:6380"
volumes:
- ./docker-compose/redis-data:/var/lib/redis
networks:
- keystone.guru
php-redis-admin:
image: erikdubbelboer/phpredisadmin
container_name: keystone.guru-php-redis-admin
depends_on:
- redis
ports:
- "6381:80"
environment:
- REDIS_1_HOST=redis
- REDIS_1_name="Keystone.guru Redis"
- REDIS_1_PORT=6380
networks:
- keystone.guru
php-deployer:
build:
context: docker-compose/php-deployer
dockerfile: Dockerfile
image: keystone.guru-php-deployer
container_name: keystone.guru-php-deployer
depends_on:
- db
- db-combatlog
- redis
restart: no
working_dir: /var/www/
volumes:
- ./:/var/www
networks:
- keystone.guru
secrets:
- deployer_ssh_key
# https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/#sample-docker-composeyml
opensearch-node1:
image: opensearchproject/opensearch:2.13.0
container_name: keystone.guru-opensearch-node1
environment:
- cluster.name=keystone.guru-opensearch-cluster
- node.name=keystone.guru-opensearch-node1
- discovery.seed_hosts=keystone.guru-opensearch-node1,keystone.guru-opensearch-node2
- cluster.initial_cluster_manager_nodes=keystone.guru-opensearch-node1,keystone.guru-opensearch-node2
- bootstrap.memory_lock=true
- http.port=9201
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- "DISABLE_INSTALL_DEMO_CONFIG=true"
- "DISABLE_SECURITY_PLUGIN=true"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data1:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container
ports:
- 9201:9201 # REST API
- 9600:9600 # Performance Analyzer
networks:
- keystone.guru
opensearch-node2:
image: opensearchproject/opensearch:2.13.0
container_name: keystone.guru-opensearch-node2
environment:
- cluster.name=keystone.guru-opensearch-cluster
- node.name=keystone.guru-opensearch-node2
- discovery.seed_hosts=keystone.guru-opensearch-node1,keystone.guru-opensearch-node2
- cluster.initial_cluster_manager_nodes=keystone.guru-opensearch-node1,keystone.guru-opensearch-node2
- bootstrap.memory_lock=true
- http.port=9201
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- "DISABLE_INSTALL_DEMO_CONFIG=true"
- "DISABLE_SECURITY_PLUGIN=true"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch-data2:/usr/share/opensearch/data
networks:
- keystone.guru
opensearch-dashboards:
build:
context: docker-compose/opensearch-dashboards
dockerfile: Dockerfile
image: keystone.guru-opensearch-dashboards
container_name: keystone.guru-opensearch-dashboards
ports:
- 5602:5601 # Map host port 5601 to container port 5601
expose:
- "5602" # Expose port 5601 for web access to OpenSearch Dashboards
environment:
- 'OPENSEARCH_HOSTS: ["https://keystone.guru-opensearch-node1:9201","https://keystone.guru-opensearch-node2:9201"]'
- "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true"
# volumes:
# - /docker-compose/opensearch/opensearch_dashboards.yml:/usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
networks:
- keystone.guru
influxdb:
image: influxdb:1.8.10
container_name: keystone.guru-influxdb
ports:
- "8096:8086" # 8086 is default port - but I moved it to avoid conflicts
volumes:
- influxdb-data:/var/lib/influxdb
environment:
- INFLUXDB_DB=local # Creates a default database named 'mydb'
- INFLUXDB_ADMIN_USER=admin # Sets up an admin user (requires `INFLUXDB_ADMIN_PASSWORD`)
- INFLUXDB_ADMIN_PASSWORD=admin123 # Admin password
restart: unless-stopped
networks:
- keystone.guru
grafana:
image: grafana/grafana:9.5.19-ubuntu
container_name: keystone.guru-grafana
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
- ./docker-compose/grafana/provisioning:/etc/grafana/provisioning # Mount provisioning directory
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin123
depends_on:
- influxdb
networks:
- keystone.guru
volumes:
opensearch-data1:
opensearch-data2:
influxdb-data:
grafana-data:
secrets:
deployer_ssh_key:
file: ~/.ssh/php-deployer
networks:
keystone.guru:
driver: bridge