-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathdocker-compose.yml
executable file
·49 lines (46 loc) · 1.26 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
version: '3.8'
services:
myddleware:
build:
context: .
dockerfile: Dockerfile
ports:
- ${myddleware_port:-30080}:80
environment:
- MYSQL_HOST=mysql
- MYSQL_DATABASE=myddleware
- MYSQL_ROOT_PASSWORD=${mysql_root_password:-secret}
volumes:
- .:/var/www/html:delegated
- ./docker/tmp/composer:/root/.composer:delegated
- ./docker/php/php.ini:/usr/local/etc/php/php.ini:ro
depends_on:
mysql:
condition: service_healthy
restart: always
mysql:
image: mysql:5.7.33
environment:
- MYSQL_DATABASE=myddleware
- MYSQL_ROOT_PASSWORD=${mysql_root_password:-secret}
- MYSQL_USER=myddleware
- MYSQL_PASSWORD=${mysql_password:-secret}
command:
- --max_allowed_packet=524288000
- --wait_timeout=100
- --innodb_buffer_pool_size=1G
- --innodb_flush_method=O_DIRECT
- --innodb_flush_log_at_trx_commit=2
- --innodb_buffer_pool_instances=4
- --innodb_read_io_threads=4
- --innodb_write_io_threads=4
volumes:
- mysql_data:/var/lib/mysql:delegated
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
restart: always
volumes:
mysql_data: