-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml.example
295 lines (283 loc) · 7.91 KB
/
docker-compose.yml.example
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
name: dpe
services:
mysql:
image: mysql:${MYSQL_VERSION}
environment:
TZ: ${TZ}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_ROOT_HOST: "%"
volumes:
- ${DIR_DATA}/mysql:/var/lib/mysql
- ${DIR_LOGS}/mysql:/var/log/mysql
- ${DIR_CONFIG}/mysql/mysql.cnf:/etc/mysql/conf.d/mysql.cnf:ro
hostname: mysql
container_name: dpe_mysql
ports:
- "${MYSQL_HOST_PORT}:3306"
networks:
- dpe
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
redis:
image: redis:${REDIS_VERSION}
environment:
TZ: ${TZ}
volumes:
- ${DIR_DATA}/redis:/data
- ${DIR_CONFIG}/redis/redis.conf:/etc/redis.conf:ro
hostname: redis
container_name: dpe_redis
ports:
- "${REDIS_HOST_PORT}:6379"
command: [ "redis-server", "/etc/redis.conf", "--requirepass", "${REDIS_PASSWORD}" ]
networks:
- dpe
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
memcached:
image: memcached:${MEMCACHED_VERSION}
environment:
TZ: ${TZ}
hostname: memcached
container_name: dpe_memcached
ports:
- "${MEMCACHED_HOST_PORT}:11211"
command: [ "memcached", "-m", "${MEMCACHED_MEMORY}" ]
networks:
- dpe
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
php83:
image: suyar/php:8.3-integration
environment:
TZ: ${TZ}
COMPOSER_ALLOW_SUPERUSER: 1
COMPOSER_HOME: /tmp/composer
volumes:
- ${DIR_CONFIG}/php83/php.ini:/usr/local/etc/php/php.ini:ro
- ${DIR_CONFIG}/php83/php-fpm.conf:/usr/local/etc/php-fpm.d/zz-custom.conf:ro
- ${DIR_CONFIG}/php83/supervisor.conf:/etc/supervisor/conf.d/service.conf:ro
- ${DIR_LOGS}/php83/supervisor:/var/log/supervisor
- ${DIR_LOGS}/php83/log:/var/log/php
- ${DIR_DATA}/composer:/tmp/composer
- ${DIR_WWW}:/www
working_dir: /www
hostname: php83
container_name: dpe_php83
cap_add:
- SYS_PTRACE
networks:
- dpe
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
nginx:
image: nginx:${NGINX_VERSION}
environment:
TZ: ${TZ}
volumes:
- ${DIR_CONFIG}/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ${DIR_CONFIG}/nginx/conf.d:/etc/nginx/conf.d:ro
- ${DIR_CONFIG}/nginx/ssl:/etc/nginx/ssl:ro
- ${DIR_LOGS}/nginx:/var/log/nginx
- ${DIR_WWW}:/www
working_dir: /www
hostname: nginx
container_name: dpe_nginx
ports:
- "${NGINX_HTTP_HOST_PORT}:80"
- "${NGINX_HTTPS_HOST_PORT}:443"
networks:
dpe:
aliases:
- example.laravel.local
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
rabbitmq:
image: rabbitmq:${RABBITMQ_VERSION}
environment:
TZ: ${TZ}
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
volumes:
- ${DIR_DATA}/rabbitmq:/var/lib/rabbitmq
- ${DIR_LOGS}/rabbitmq:/var/log/rabbitmq
- ${DIR_CONFIG}/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
- ${DIR_CONFIG}/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins:ro
hostname: rabbitmq
container_name: dpe_rabbitmq
ports:
- "${RABBITMQ_HOST_PORT}:5672"
- "${RABBITMQ_MANAGE_HOST_PORT}:15672"
networks:
- dpe
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
mongodb:
image: mongo:${MONGODB_VERSION}
environment:
TZ: ${TZ}
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_INITDB_ROOT_PASSWORD}
volumes:
- ${DIR_DATA}/mongodb:/data/db
- ${DIR_LOGS}/mongodb:/var/log/mongodb
- ${DIR_CONFIG}/mongodb/mongod.conf:/etc/mongo/mongod.conf:ro
hostname: mongodb
container_name: dpe_mongodb
ports:
- "${MONGODB_HOST_PORT}:27017"
command: [ "--config", "/etc/mongo/mongod.conf" ]
networks:
- dpe
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
elasticsearch:
image: elasticsearch:${ELASTICSEARCH_VERSION}
ulimits:
nofile:
soft: 65535
hard: 65535
memlock:
soft: -1
hard: -1
environment:
- TZ=${TZ}
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- ${DIR_DATA}/elasticsearch:/usr/share/elasticsearch/data
- ${DIR_LOGS}/elasticsearch:/usr/share/elasticsearch/logs
- ${DIR_CONFIG}/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
hostname: elasticsearch
container_name: dpe_elasticsearch
ports:
- "${ELASTICSEARCH_HOST_PORT}:9200"
networks:
- dpe
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
kibana:
image: kibana:${ELASTICSEARCH_VERSION}
environment:
TZ: ${TZ}
ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]'
I18N_LOCALE: ${kIBANA_I18N_LOCALE}
hostname: kibana
container_name: dpe_kibana
ports:
- "${kIBANA_HOST_PORT}:5601"
networks:
- dpe
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
clickhouse:
image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION}
ulimits:
nofile:
soft: 262144
hard: 262144
cap_add:
- SYS_NICE
- NET_ADMIN
- IPC_LOCK
environment:
TZ: ${TZ}
volumes:
- ${DIR_DATA}/clickhouse:/var/lib/clickhouse
- ${DIR_LOGS}/clickhouse:/var/log/clickhouse-server
- ${DIR_CONFIG}/clickhouse/config.d:/etc/clickhouse-server/config.d:ro
- ${DIR_CONFIG}/clickhouse/users.d:/etc/clickhouse-server/users.d:ro
hostname: clickhouse
container_name: dpe_clickhouse
ports:
- "${CLICKHOUSE_PORT}:8123"
networks:
- dpe
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
kafka:
image: bitnami/kafka:${KAFKA_VERSION}
environment:
TZ: ${TZ}
# KRaft
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: broker,controller
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093
# Listeners
KAFKA_CFG_LISTENERS: INTERNAL://:9092,CONTROLLER://:9093,EXTERNAL://:9094
KAFKA_CFG_ADVERTISED_LISTENERS: INTERNAL://:9092,EXTERNAL://127.0.0.1:9094
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:SASL_PLAINTEXT,INTERNAL:SASL_PLAINTEXT,EXTERNAL:SASL_PLAINTEXT
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: INTERNAL
# SASL
KAFKA_CFG_SASL_MECHANISM_CONTROLLER_PROTOCOL: PLAIN
KAFKA_CFG_SASL_MECHANISM_INTER_BROKER_PROTOCOL: PLAIN
KAFKA_CONTROLLER_USER: ${KAFKA_USER}
KAFKA_CONTROLLER_PASSWORD: ${KAFKA_PASS}
KAFKA_INTER_BROKER_USER: ${KAFKA_USER}
KAFKA_INTER_BROKER_PASSWORD: ${KAFKA_PASS}
KAFKA_CLIENT_USERS: ${KAFKA_USER}
KAFKA_CLIENT_PASSWORDS: ${KAFKA_PASS}
# config
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: true
KAFKA_CFG_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_CFG_LOG_RETENTION_MINUTES: 10
KAFKA_CFG_NUM_PARTITIONS: 3
volumes:
- ${DIR_DATA}/kafka:/bitnami/kafka
hostname: kafka
container_name: dpe_kafka
ports:
- "${KAFKA_PORT}:9092-9095"
networks:
- dpe
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "1"
networks:
dpe:
driver: bridge