-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.sync.yml
102 lines (92 loc) · 2.14 KB
/
docker-compose.sync.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: '3'
services:
nginx:
image: nginx:alpine
ports:
- "80:80"
- "8080:8080"
- "443:443"
volumes:
- www-docker-sync:/var/www/html/:rw
- ./conf/nginx/conf.d:/etc/nginx/conf.d/:ro
- ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./log/nginx/:/var/log/nginx/:rw
links:
- php72:fpm72
- php56:fpm56
environment:
- TZ=Asia/Shanghai
networks:
docker_net:
ipv4_address: ${NGINX_IP}
php72:
build: ./php/php72/
expose:
- "9000"
volumes:
- www-docker-sync:/var/www/html/:rw
- ./conf/php/php72.ini:/usr/local/etc/php/php.ini:ro
- ./conf/php/php-fpm.d/www72.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php-fpm/:/var/log/php-fpm/:rw
links:
- mysql:mysql
- redis:redis
networks:
docker_net:
ipv4_address: ${PHP72_IP}
php56:
build: ./php/php56/
expose:
- "9000"
volumes:
- www-docker-sync:/var/www/html/:rw
- ./conf/php/php56.ini:/usr/local/etc/php/php.ini:ro
- ./conf/php/php-fpm.d/www56.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php-fpm/:/var/log/php-fpm/:rw
links:
- mysql:mysql
- redis:redis
networks:
docker_net:
ipv4_address: ${PHP56_IP}
mysql:
image: mysql:5.6
ports:
- "3306:3306"
volumes:
- ./conf/mysql/my.cnf:/etc/mysql/my.cnf:ro
- ./mysql/:/var/lib/mysql/:rw
- ./log/mysql/:/var/log/mysql/:rw
environment:
MYSQL_ROOT_PASSWORD: "123456"
networks:
docker_net:
ipv4_address: ${MYSQL_IP}
redis:
image: redis:latest
ports:
- "6379:6379"
networks:
docker_net:
ipv4_address: ${REDIS_IP}
portainer:
image: portainer/portainer:latest
ports:
- "9000:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./portainer/:/data
networks:
docker_net:
ipv4_address: ${PORTAINER_IP}
volumes:
www-docker-sync:
external: true
networks:
docker_net:
driver: bridge
ipam:
driver: default
config:
-
subnet: "${DOCKER_SUBNET}"