-
Notifications
You must be signed in to change notification settings - Fork 126
/
docker-compose.yml
41 lines (38 loc) · 940 Bytes
/
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
version: '2'
services:
php:
container_name: php
image: yiisoftware/yii2-php:7.4-apache
volumes:
- ~/.composer-docker/cache:/root/.composer/cache:delegated
- ./:/app:delegated
ports:
- '8000:80'
environment:
PHP_ENABLE_XDEBUG: ${PHP_ENABLE_XDEBUG:-0}
XDEBUG_CONFIG: ${XDEBUG_CONFIG:-}
XDEBUG_MODE: ${XDEBUG_MODE:-off}
adminer:
container_name: adminer
image: adminer
restart: unless-stopped
ports:
- 8080:8080
db:
container_name: db
image: mysql:8
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_HOST: '%'
volumes:
- db:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
start_period: 60s
interval: 120s
timeout: 10s
retries: 5
volumes:
db: