-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (61 loc) · 1.37 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
version: '3'
# Services
services:
# Nginx Service
nginx:
build:
context: ./.docker/nginx
dockerfile: Dockerfile
image: frehman/nginximages:${TAG}
ports:
- 80:80
volumes:
- ./src:/var/www/php
- ./.docker/nginx/conf.d:/etc/nginx/conf.d
depends_on:
- php
# PHP Service
php:
build:
context: ./.docker/php
dockerfile: Dockerfile
image: frehman/phpimages:${TAG}
working_dir: /var/www/php
volumes:
- ./src:/var/www/php
depends_on:
- mysql
# MySQL Service
mysql:
build:
context: ./.docker/mysql
dockerfile: Dockerfile
image: frehman/mysqlimages:${TAG}
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: demo
volumes:
- ./.docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- faisal-db-data:/var/lib/mysql
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=$MYSQL_ROOT_PASSWORD
interval: 5s
retries: 10
# PHP MyAdmin
phpmyadmin:
build:
context: ./.docker/phpmyadmin
dockerfile: Dockerfile
image: frehman/myadminimages:${TAG}
environment:
MYSQL_USERNAME: root
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
PMA_HOST: mysql
ports:
- "8080:80"
restart: always
depends_on:
- mysql
volumes:
faisal-db-data: