-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
206 lines (195 loc) · 5.45 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
services:
### Nginx container #########################################
nginx:
container_name: dnmp-nginx
build:
context: ./build/nginx
args:
TIME_ZONE: ${GLOBAL_TIME_ZONE}
CHANGE_SOURCE: ${GLOBAL_CHANGE_SOURCE}
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
volumes:
- ${WWW_DIR}:/etc/nginx/html/:rw
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./config/nginx/vhost:/etc/nginx/conf.d:ro
- ./config/nginx/rewrite:/etc/nginx/rewrite:ro
- ./log/nginx:/var/log/nginx:rw
restart: always
privileged: true
networks:
- default
### PHP container #########################################
php56:
container_name: dnmp-php56
build:
context: ./build/php56
args:
TIME_ZONE: ${GLOBAL_TIME_ZONE}
CHANGE_SOURCE: ${GLOBAL_CHANGE_SOURCE}
ports:
- "${PHP56_FPM_PORT}:9000"
volumes:
- ${WWW_DIR}:/etc/nginx/html:rw
- ./config/php56/php.ini:/usr/local/etc/php/php.ini:ro
- ./config/php56/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php56:/var/log:rw
restart: always
privileged: true
environment:
TZ: "$GLOBAL_TIME_ZONE"
networks:
- default
php72:
container_name: dnmp-php72
build:
context: ./build/php72
args:
TIME_ZONE: ${GLOBAL_TIME_ZONE}
CHANGE_SOURCE: ${GLOBAL_CHANGE_SOURCE}
ports:
- "${PHP72_FPM_PORT}:9000"
volumes:
- ${WWW_DIR}:/etc/nginx/html:rw
- ./config/php72/php.ini:/usr/local/etc/php/php.ini:ro
- ./config/php72/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php72:/var/log:rw
restart: always
privileged: true
environment:
TZ: "$GLOBAL_TIME_ZONE"
networks:
- default
php74:
container_name: dnmp-php74
build:
context: ./build/php74
args:
TIME_ZONE: ${GLOBAL_TIME_ZONE}
CHANGE_SOURCE: ${GLOBAL_CHANGE_SOURCE}
ports:
- "${PHP74_FPM_PORT}:9000"
volumes:
- ${WWW_DIR}:/etc/nginx/html:rw
- ./config/php74/php.ini:/usr/local/etc/php/php.ini:ro
- ./config/php74/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php74:/var/log:rw
restart: always
privileged: true
environment:
TZ: "$GLOBAL_TIME_ZONE"
networks:
- default
php80:
container_name: dnmp-php80
build:
context: ./build/php80
args:
TIME_ZONE: ${GLOBAL_TIME_ZONE}
CHANGE_SOURCE: ${GLOBAL_CHANGE_SOURCE}
ports:
- "${PHP80_FPM_PORT}:9000"
volumes:
- ${WWW_DIR}:/etc/nginx/html:rw
- ./config/php80/php.ini:/usr/local/etc/php/php.ini:ro
- ./config/php80/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php80:/var/log:rw
restart: always
privileged: true
environment:
TZ: "$GLOBAL_TIME_ZONE"
networks:
- default
php81:
container_name: dnmp-php81
build:
context: ./build/php81
args:
TIME_ZONE: ${GLOBAL_TIME_ZONE}
CHANGE_SOURCE: ${GLOBAL_CHANGE_SOURCE}
ports:
- "${PHP81_FPM_PORT}:9000"
volumes:
- ${WWW_DIR}:/etc/nginx/html:rw
- ./config/php81/php.ini:/usr/local/etc/php/php.ini:ro
- ./config/php81/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php81:/var/log:rw
restart: always
privileged: true
environment:
TZ: "$GLOBAL_TIME_ZONE"
networks:
- default
php82:
container_name: dnmp-php82
build:
context: ./build/php82
args:
TIME_ZONE: ${GLOBAL_TIME_ZONE}
CHANGE_SOURCE: ${GLOBAL_CHANGE_SOURCE}
ports:
- "${PHP82_FPM_PORT}:9000"
volumes:
- ${WWW_DIR}:/etc/nginx/html:rw
- ./config/php82/php.ini:/usr/local/etc/php/php.ini:ro
- ./config/php82/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf:rw
- ./log/php82:/var/log:rw
restart: always
privileged: true
environment:
TZ: "$GLOBAL_TIME_ZONE"
networks:
- default
### Mysql container #########################################
mysql:
container_name: dnmp-mysql
image: mysql:5.7
ports:
- "${MYSQL_PORT}:3306"
volumes:
- ./data/mysql:/var/lib/mysql:rw
- ./config/mysql/my.cnf:/etc/mysql/conf.d/mysql.cnf:ro
- ./log/mysql:/var/log/mysql:rw
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
TZ: "$GLOBAL_TIME_ZONE"
networks:
- default
### Redis container #########################################
redis:
container_name: dnmp-redis
image: redis:latest
ports:
- "${REDIS_PORT}:6379"
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./config/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro
- ./log/redis:/var/log/redis:rw
- ./data/redis:/data:rw
restart: always
privileged: true
networks:
- default
### mongodb container #########################################
# mongodb:
# container_name: dnmp-mongodb
# image: mongo:latest
# ports:
# - "${MONGODB_PORT}:27017"
# environment:
# MONGO_INITDB_ROOT_USERNAME: "${MONGODB_INITDB_ROOT_USERNAME}"
# MONGO_INITDB_ROOT_PASSWORD: "${MONGODB_INITDB_ROOT_PASSWORD}"
# TZ: "$GLOBAL_TIME_ZONE"
# volumes:
# - ./data/mongodb/db:/data/db:rw
# - ./data/mongodb/log:/var/log/mongodb:rw
# restart: always
# privileged: true
# command:
# --auth
# networks:
# - default
networks:
default: