-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
236 lines (236 loc) · 7.9 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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
x-php-template: &php
restart: 'always'
networks:
internal:
volumes:
- ${DOCUMENT_ROOT}:/var/www/html:rw
- ./docker/config/php/php.ini:/usr/local/etc/php/php.ini
- ./docker/config/php/docker-php-ext-xdebug3.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
environment: &php_env
XDEBUG_MODE: debug
XDEBUG_CONFIG: client_host=host.docker.internal
XDEBUG_SESSION: PHPSTORM
networks:
internal:
services:
traefik:
image: "traefik:v2.5"
container_name: "${COMPOSE_PROJECT_NAME}-traefik"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:${HOST_PORT_HTTP}"
- "--providers.docker.network=internal"
networks:
- internal
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
ports:
- "${HOST_PORT_HTTP}:${HOST_PORT_HTTP}"
- "${HOST_PORT_TRAEFIK}:8080"
apache24:
image: httpd:2.4
container_name: '${COMPOSE_PROJECT_NAME}-apache'
volumes:
- ${DOCUMENT_ROOT}:/var/www/html:rw
- ./docker/config/apache/vhosts:/usr/local/apache2/sites-enabled
- ./docker/config/apache/httpd.conf:/usr/local/apache2/conf/httpd.conf
- ./docker/data/logs/apache2:/var/log/apache2
networks:
- internal
labels:
- traefik.enable=true
# php 8.4
- traefik.http.routers.php84.rule=Host(`f3.php84.localhost`)
- traefik.http.routers.php84.service=php84
- traefik.http.services.php84.loadbalancer.server.port=8084
# php 8.3
- traefik.http.routers.php83.rule=Host(`f3.php83.localhost`)
- traefik.http.routers.php83.service=php83
- traefik.http.services.php83.loadbalancer.server.port=8083
# php 8.2
- traefik.http.routers.php82.rule=Host(`f3.php82.localhost`)
- traefik.http.routers.php82.service=php82
- traefik.http.services.php82.loadbalancer.server.port=8082
# php 8.1
- traefik.http.routers.php81.rule=Host(`f3.php81.localhost`)
- traefik.http.routers.php81.service=php81
- traefik.http.services.php81.loadbalancer.server.port=8081
# php 8.0
- traefik.http.routers.php80.rule=Host(`f3.php80.localhost`)
- traefik.http.routers.php80.service=php80
- traefik.http.services.php80.loadbalancer.server.port=8080
# php 7.4
- traefik.http.routers.php74.rule=Host(`f3.php74.localhost`)
- traefik.http.routers.php74.service=php74
- traefik.http.services.php74.loadbalancer.server.port=8074
# php 7.3
- traefik.http.routers.php73.rule=Host(`f3.php73.localhost`)
- traefik.http.routers.php73.service=php73
- traefik.http.services.php73.loadbalancer.server.port=8073
# php 7.2
- traefik.http.routers.php72.rule=Host(`f3.php72.localhost`)
- traefik.http.routers.php72.service=php72
- traefik.http.services.php72.loadbalancer.server.port=8072
nginx:
image: nginx:latest
container_name: '${COMPOSE_PROJECT_NAME}-nginx'
volumes:
- ${DOCUMENT_ROOT}:/usr/share/nginx/html:rw
- ./docker/config/nginx/vhosts/default.conf:/etc/nginx/conf.d/default.conf
- ./docker/config/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/data/logs/nginx:/var/log/nginx
networks:
- internal
labels:
- traefik.enable=true
# php 8.4
- traefik.http.routers.ngx-php84.rule=Host(`f3.nginx.php84.localhost`)
- traefik.http.routers.ngx-php84.service=php84
- traefik.http.services.ngx-php84.loadbalancer.server.port=8084
# php 8.3
- traefik.http.routers.ngx-php83.rule=Host(`f3.nginx.php83.localhost`)
- traefik.http.routers.ngx-php83.service=php83
- traefik.http.services.ngx-php83.loadbalancer.server.port=8083
# php 8.2
- traefik.http.routers.ngx-php82.rule=Host(`f3.nginx.php82.localhost`)
- traefik.http.routers.ngx-php82.service=php82
- traefik.http.services.ngx-php82.loadbalancer.server.port=8082
# php 8.1
- traefik.http.routers.ngx-php81.rule=Host(`f3.nginx.php81.localhost`)
- traefik.http.routers.ngx-php81.service=php81
- traefik.http.services.ngx-php81.loadbalancer.server.port=8081
# php 8.0
- traefik.http.routers.ngx-php80.rule=Host(`f3.nginx.php80.localhost`)
- traefik.http.routers.ngx-php80.service=php80
- traefik.http.services.ngx-php80.loadbalancer.server.port=8080
# php 7.4
- traefik.http.routers.ngx-php74.rule=Host(`f3.nginx.php74.localhost`)
- traefik.http.routers.ngx-php74.service=php74
- traefik.http.services.ngx-php74.loadbalancer.server.port=8074
# php 7.2
- traefik.http.routers.ngx-php72.rule=Host(`f3.nginx.php72.localhost`)
- traefik.http.routers.ngx-php72.service=php72
- traefik.http.services.ngx-php72.loadbalancer.server.port=8072
php84:
<<: *php
build:
context: ./docker/bin/php84
container_name: '${COMPOSE_PROJECT_NAME}-php84'
environment:
<<: *php_env
PHP_IDE_CONFIG: serverName=f3.php84.localhost
php83:
<<: *php
build:
context: ./docker/bin/php83
container_name: '${COMPOSE_PROJECT_NAME}-php83'
environment:
<<: *php_env
PHP_IDE_CONFIG: serverName=f3.php83.localhost
php82:
<<: *php
build:
context: ./docker/bin/php82
container_name: '${COMPOSE_PROJECT_NAME}-php82'
environment:
<<: *php_env
PHP_IDE_CONFIG: serverName=f3.php82.localhost
php81:
<<: *php
build:
context: ./docker/bin/php81
container_name: '${COMPOSE_PROJECT_NAME}-php81'
environment:
<<: *php_env
PHP_IDE_CONFIG: serverName=f3.php81.localhost
php80:
<<: *php
build:
context: ./docker/bin/php80
container_name: '${COMPOSE_PROJECT_NAME}-php80'
environment:
<<: *php_env
PHP_IDE_CONFIG: serverName=f3.php80.localhost
php74:
<<: *php
platform: linux/x86_64
build:
context: ./docker/bin/php74
container_name: '${COMPOSE_PROJECT_NAME}-php74'
environment:
<<: *php_env
PHP_IDE_CONFIG: serverName=f3.php74.localhost
php73:
<<: *php
platform: linux/x86_64
build:
context: ./docker/bin/php73
container_name: '${COMPOSE_PROJECT_NAME}-php73'
environment:
<<: *php_env
PHP_IDE_CONFIG: serverName=f3.php73.localhost
php72:
<<: *php
platform: linux/x86_64
build:
context: ./docker/bin/php72
container_name: '${COMPOSE_PROJECT_NAME}-php72'
environment:
<<: *php_env
PHP_IDE_CONFIG: serverName=f3.php72.localhost
mysql:
image: mysql:5.7
container_name: '${COMPOSE_PROJECT_NAME}-mysql'
restart: 'always'
ports:
- "${HOST_PORT_MYSQL}:${MYSQL_PORT}"
volumes:
- ./docker/data/mysql:/var/lib/mysql
- ./docker/data/logs/mysql:/var/log/mysql
command: mysqld --general-log=1 --general-log-file=/var/log/mysql/general-log.log
networks:
internal:
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
pgsql:
image: postgres:latest
container_name: '${COMPOSE_PROJECT_NAME}-pgsql'
restart: 'always'
ports:
- "${HOST_PORT_PGSQL}:${PGSQL_PORT}"
networks:
internal:
environment:
POSTGRES_DB: ${PGSQL_DATABASE}
POSTGRES_USER: ${PGSQL_USER}
POSTGRES_PASSWORD: ${PGSQL_PASSWORD}
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
container_name: '${COMPOSE_PROJECT_NAME}-mssql'
restart: 'always'
networks:
internal:
ports:
- "${HOST_PORT_MSSQL}:1433"
environment:
ACCEPT_EULA: Y
SA_PASSWORD: fatfree-root
MSSQL_PID: Developer
redis:
container_name: '${COMPOSE_PROJECT_NAME}-redis'
image: redis:latest
networks:
internal:
ports:
- "${HOST_PORT_REDIS}:6379"
memcached:
container_name: '${COMPOSE_PROJECT_NAME}-memcached'
image: memcached:latest
networks:
internal: