-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (47 loc) · 1.02 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
version: "3.9"
services:
#Nginx service
nginx:
image: nginx:1.21
ports:
- 80:80
volumes:
- "./website:/var/www/php"
- "./.docker/nginx/conf.d:/etc/nginx/conf.d"
depends_on:
- php
#PHP service
php:
build: ./.docker/php
working_dir: /var/www/php
volumes:
- "./website:/var/www/php"
depends_on:
mysql:
condition: service_healthy
#MySQL service
mysql:
image: mariadb:10.8
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: demo
volumes:
- ./.docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- mysqldata:/var/lib/mysql
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD
interval: 5s
retries: 10
#PhpMyAdmin service
phpmyadmin:
image: phpmyadmin/phpmyadmin:5
ports:
- 8080:80
environment:
PMA_HOST: mysql
depends_on:
mysql:
condition: service_healthy
volumes:
mysqldata: {}