-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
129 lines (120 loc) · 2.87 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
version: '3'
services:
nginx:
container_name: 'nginx_web'
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ${WORKSPACES}:/var/www/: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}
apache:
container_name: 'apache_web'
image: httpd:2.4
ports:
- "8080:80"
- "4343:443"
links:
- php72:fpm72
- php56:fpm56
volumes:
- ${WORKSPACES}:/var/www/:rw
- ./conf/apache/:/usr/local/apache2/conf/:rw
- ./log/apache/:/usr/local/apache2/logs/:rw
networks:
docker_net:
ipv4_address: ${APACHE_IP}
php72:
container_name: 'php72'
image: 5353920/php7.2.11:v1
restart: always
expose:
- "9000"
- "9501"
volumes:
- ${WORKSPACES}:/var/www/: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
extra_hosts:
- "www.wu.cn:172.100.0.2"
- "shop.du.cn:172.100.0.2"
networks:
docker_net:
ipv4_address: ${PHP72_IP}
php56:
container_name: 'php56'
image: 5353920/php5.6.38:v1
expose:
- "9000"
- "9501"
volumes:
- ${WORKSPACES}:/var/www/: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:
container_name: 'mysql'
image: mysql:8.0
ports:
- "3306:3306"
volumes:
- ./conf/mysql/conf.d/mysql.cnf:/etc/mysql/conf.d/mysql.cnf:ro
- ./data/mysql/:/var/lib/mysql/:rw
environment:
MYSQL_ROOT_PASSWORD: "root"
networks:
docker_net:
ipv4_address: ${MYSQL_IP}
redis:
container_name: 'redis'
image: redis:latest
ports:
- "6379:6379"
networks:
docker_net:
ipv4_address: ${REDIS_IP}
portainer:
container_name: 'portainer'
image: portainer/portainer:latest
ports:
- "9000:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
- ./data/portainer/:/data:rw
networks:
docker_net:
ipv4_address: ${PORTAINER_IP}
composer:
container_name: 'composer'
image: composer/composer:php7
command: install
volumes:
- ${WORKSPACES}:/var/www/:rw
networks:
docker_net:
driver: bridge
ipam:
driver: default
config:
- subnet: "${DOCKER_SUBNET}"