-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
177 lines (159 loc) · 4.02 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#############################################
# author:ross #
# mail:[email protected] #
# time:2017/02/20 #
# description:docker compose #
#############################################
version: '3'
services:
######## php-fpm ########
php-fpm:
build:
context: ./php-fpm
dockerfile: Dockerfile
args:
- INSTALL_MYSQLI=${INSTALL_MYSQLI}
- INSTALL_PDO_MYSQL=${INSTALL_PDO_MYSQL}
- INSTALL_SWOOLE=${INSTALL_SWOOLE}
- INSTALL_REDIS=${INSTALL_REDIS}
- INSTALL_OPCACHE=${INSTALL_OPCACHE}
- INSTALL_PCNTL=${INSTALL_PCNTL}
- INSTALL_IMAGICK=${INSTALL_IMAGICK}
- INSTALL_GD=${INSTALL_GD}
- INSTALL_ZIP=${INSTALL_ZIP}
- INSTALL_MSGPACK=${INSTALL_MSGPACK}
- INSTALL_XDEBUG=${INSTALL_XDEBUG}
- INSTALL_SOAP=${INSTALL_SOAP}
- INSTALL_MONGO=${INSTALL_MONGO}
- INSTALL_ZIP_ARCHIVE=${INSTALL_ZIP_ARCHIVE}
- INSTALL_BCMATH=${INSTALL_BCMATH}
- INSTALL_MEMCACHED=${INSTALL_MEMCACHED}
- INSTALL_XHPROF=${INSTALL_XHPROF}
- CODEIGNITER=${CODEIGNITER}
- PHP_XDEBUG_VERSION=${PHP_XDEBUG_VERSION}
volumes:
- ./php-fpm/php.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
expose:
- "9000"
ports:
- "9501:9501"
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
environment:
XDEBUG_CONFIG: ${XDEBUG_CONFIG}
PHP_IDE_CONFIG: ${PHP_IDE_CONFIG}
networks:
- backend
######## nginx ########
nginx:
build:
context: ./nginx
args:
- PHP_UPSTREAM=php-fpm
volumes:
- ./logs/nginx/:/var/log/nginx
- ./nginx/ssl/:/etc/ssl
- ./nginx/config/:/etc/nginx/conf.d
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
ports:
- "80:80"
- "443:443"
depends_on:
- php-fpm
- mysql
networks:
- frontend
- backend
######## mysql ########
mysql:
build:
context: ./mysql
dockerfile: Dockerfile
args:
- MYSQL_USER=ross
- MYSQL_PASSWORD=ross
- MYSQL_ROOT_PASSWORD=root
volumes:
- mysql:/var/lib/mysql
ports:
- "3306:3306"
networks:
- backend
######## redis ########
redis:
build:
context: ./redis
volumes:
- redis:/data
#- ${DATA_SAVE_PATH}/redis:/data
ports:
- "6379:6379"
networks:
- backend
######## openresty ########
openresty:
build:
context: ./openresty
volumes:
- ./logs/openresty/:/usr/local/openresty/nginx/logs
- ./openresty/conf/:/usr/local/openresty/nginx/conf.d
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
ports:
- "8888:8888"
networks:
- backend
privileged: true
######## slate ########
slate:
build:
context: ./slate
dockerfile: Dockerfile
volumes:
- ${SLATE_SOURCE_PATH}:/usr/src/slate/source
ports:
- "4567:4567"
###### MongoDB Container ######
mongo:
build: ./mongo
ports:
- "27017:27017"
volumes:
# - ${DATA_SAVE_PATH}/mongo:/data/db
- mongo:/data/db
networks:
- backend
### ElasticSearch ##########
elasticsearch:
build: ./elasticsearch
volumes:
- elasticsearch:/usr/share/elasticsearch/data
environment:
- cluster.name=yesterday679
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "9200:9200"
networks:
- frontend
- backend
### Networks Setup ############################################
networks:
frontend:
driver: ${NETWORKS_DRIVER}
backend:
driver: ${NETWORKS_DRIVER}
### Volumes Setup #############################################
volumes:
mysql:
driver: ${VOLUMES_DRIVER}
redis:
driver: ${VOLUMES_DRIVER}
mongo:
driver: ${VOLUMES_DRIVER}
elasticsearch:
driver: ${VOLUMES_DRIVER}