forked from pointline/alpine-dnmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
83 lines (78 loc) · 1.78 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: "3.2"
services:
## Nginx Web Container ###
nginx:
build: ./images/nginx
container_name: nginx
volumes:
- type: bind
source: ./www
target: /var/www/html
- ./conf/nginx/conf/nginx.conf:/etc/nginx/nginx.conf:ro
- ./conf/nginx/conf/conf.d:/etc/nginx/conf.d:ro
- ./logs/nginx/log:/var/log/nginx:rw
- type: bind
source: ./share-files
target: /var/www/share-files
ports:
- "80:80"
- "8080:80"
- "8035:80"
restart: always
networks:
- net-php71
depends_on:
- php71
### PHP FPM Container ###
php71:
build: ./images/php71
container_name: php71
volumes:
- type: bind
source: ./www
target: /var/www/html
- ./conf/php71/conf/php.ini:/etc/php7/php.ini:ro
- ./conf/php71/conf/php-fpm.conf:/etc/php7/php-fpm.conf:ro
- ./conf/php71/conf/conf.d/www.conf:/etc/php7/php-fpm.d/www.conf:ro
- type: bind
source: ./share-files
target: /var/www/share-files
expose:
- "9000"
restart: always
networks:
- net-php71
- net-mysql
depends_on:
- mysql
### MYSQL Container ###
mysql:
build: ./images/mysql
container_name: mysql
volumes:
- type: volume
source: db-mysql
target: /var/lib/mysql
volume:
nocopy: true
- ./conf/mysql/conf/my.cnf:/etc/mysql/my.cnf:ro
- type: bind
source: ./share-files
target: /var/www/share-files
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: 123456
restart: always
networks:
- net-mysql
### Networks Setup ###
networks:
net-php71:
driver: bridge
net-mysql:
driver: bridge
### Volumes Setup ###
volumes:
db-mysql:
driver: local