forked from yeszao/dnmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
120 lines (111 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
version: "3"
services:
nginx:
image: nginx:${NGINX_VERSION}
ports:
- "${NGINX_HTTP_HOST_PORT}:80"
- "${NGINX_HTTPS_HOST_PORT}:443"
volumes:
- ${SOURCE_DIR}:/var/www/html/:rw
- ${NGINX_CONFD_DIR}:/etc/nginx/conf.d/:rw
- ${NGINX_CONF_FILE}:/etc/nginx/nginx.conf:ro
- ${NGINX_LOG_DIR}:/var/log/nginx/:rw
restart: always
networks:
- default
php72:
build:
context: .
args:
PHP_VERSION: ${PHP72_VERSION}
PHP_XDEBUG: ${PHP72_XDEBUG}
PHP_SWOOLE: ${PHP72_SWOOLE}
PHP_REDIS: ${PHP72_REDIS}
REPLACE_SOURCE_LIST: ${REPLACE_SOURCE_LIST}
volumes:
- ${SOURCE_DIR}:/var/www/html/:rw
- ${PHP72_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
- ${PHP72_FPM_CONF_FILE}:/usr/local/etc/php-fpm.d/www.conf:rw
restart: always
cap_add:
- SYS_PTRACE
networks:
- default
php56:
build:
context: .
args:
PHP_VERSION: ${PHP56_VERSION}
PHP_XDEBUG: ${PHP56_XDEBUG}
PHP_SWOOLE: ${PHP56_SWOOLE}
PHP_REDIS: ${PHP56_REDIS}
REPLACE_SOURCE_LIST: ${REPLACE_SOURCE_LIST}
volumes:
- ${SOURCE_DIR}:/var/www/html/:rw
- ${PHP56_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
- ${PHP56_FPM_CONF_FILE}:/usr/local/etc/php-fpm.d/www.conf:rw
restart: always
cap_add:
- SYS_PTRACE
networks:
- default
php54:
build:
context: .
args:
PHP_VERSION: ${PHP54_VERSION}
PHP_XDEBUG: ${PHP54_XDEBUG}
PHP_SWOOLE: ${PHP54_SWOOLE}
PHP_REDIS: ${PHP54_REDIS}
REPLACE_SOURCE_LIST: ${REPLACE_SOURCE_LIST}
volumes:
- ${SOURCE_DIR}:/var/www/html/:rw
- ${PHP54_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
- ${PHP54_FPM_CONF_FILE}:/usr/local/etc/php-fpm.d/www.conf:rw
restart: always
cap_add:
- SYS_PTRACE
networks:
- default
mysql:
image: mysql:${MYSQL_VERSION}
ports:
- "${MYSQL_HOST_PORT}:3306"
volumes:
- ${MYSQL_CONF_FILE}:/etc/mysql/conf.d/mysql.cnf:ro
- ${MYSQL_DATA_DIR}:/var/lib/mysql/:rw
restart: always
networks:
- default
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
redis:
image: redis:${REDIS_VERSION}
ports:
- "${REDIS_HOST_PORT}:6379"
volumes:
- ${REDIS_CONF_FILE}:/etc/redis.conf:ro
restart: always
entrypoint: ["redis-server", "/etc/redis.conf"]
networks:
- default
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
ports:
- "${PHPMYADMIN_HOST_PORT}:80"
networks:
- default
environment:
- PMA_HOST=mysql
- PMA_PORT=3306
phpredisadmin:
image: erikdubbelboer/phpredisadmin:latest
ports:
- "${REDISMYADMIN_HOST_PORT}:80"
networks:
- default
environment:
- REDIS_1_HOST=redis
- REDIS_1_PORT=6379
networks:
default: