forked from linkkong/docker-lnmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
116 lines (109 loc) · 2.47 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
version: '3'
services:
openresty:
image: openresty/openresty:stretch-fat
depends_on: #如果不实用php容器服务,注释掉本行和下面一行
- php7.2
expose:
- 80
- 443
ports:
- "80:80"
- "443:443"
volumes:
- ./www:/www
- ./nginx/conf.d:/etc/nginx/conf.d
- ./openresty:/usr/local/openresty
#for mac,can improve read io speed 提升读取速度
#- ./www:/var/www/html/:cached
#- ./nginx/conf.d:/etc/nginx/conf.d:cached
#- ./openresty:/usr/local/openresty:delegated
environment:
TZ: Asia/Shanghai
restart: on-failure
#mac下建议使用原声php,docker下的php-fpm性能慢好多,即便加了缓存
php7.2:
#build: ./php/php7.2
image: lingkong/php7.2
depends_on:
- mysql
- redis
- rabbitmq
volumes:
- ./www/:/var/www/html/
- ./php/php7.2/supervisor/:/etc/supervisor/conf.d/
- ./php/php7.2/etc/:/usr/local/etc/
environment:
MYSQL_HOST: mysql:3306
REDIS_HOST: redis:6379
TZ: Asia/Shanghai
restart: on-failure
mysql:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: root
TZ: Asia/Shanghai
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/config:/etc/mysql/conf.d
#for mac
#- ./mysql/data:/var/lib/mysql:delegated
#- ./mysql/config:/etc/mysql/conf.d:cached
expose:
- 3306
ports:
- "3306:3306"
restart: on-failure
redis:
image: redis:latest
expose:
- 6379
ports:
- "6379:6379"
environment:
TZ: Asia/Shanghai
restart: on-failure
rabbitmq:
image: rabbitmq:3.7.2-management
expose:
- 5672
- 15672
ports:
- "15672:15672"
restart: on-failure
environment:
TZ: Asia/Shanghai
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
# RABBITMQ_DEFAULT_VHOST: /
phpmyadmin:
image: phpmyadmin/phpmyadmin
expose:
- 8080
- 80
ports:
- "8080:80"
depends_on:
- "mysql"
environment:
PMA_HOST: mysql
PMA_USER: root
PMA_PASSWORD: root
TZ: Asia/Shanghai
restart: on-failure
phpredisadmin:
image: erikdubbelboer/phpredisadmin
ports:
- "8081:80"
depends_on:
- "redis"
environment:
REDIS_1_HOST: redis
REDIS_1_NAME: MyRedis
restart: on-failure
# mongo:
# image: mongo
# expose:
# - 27017
# ports:
# - "27017:27017"