-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
243 lines (226 loc) · 7.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
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
237
238
239
240
241
242
243
#docker-compose.yml (Development)
version: "3.8"
volumes:
mysql:
networks:
joomlatools-server:
name: joomlatools-server
services:
#docker compose up
joomlatools-server:
image: joomlatools-server
hostname: joomlatools-server
container_name: joomlatools-server
restart: unless-stopped
environment:
- APP_NAME=joomlatools-server
- APP_ENV=development
- APP_DEBUG=on
- APP_CACHE=off
- APP_PRELOAD=off
- APP_HTTP=8080
- APP_HTTPS=8443
build:
context: .
args:
IMAGE_TAG: master
env_file:
- .env
labels:
- "traefik.enable=true"
# Routers
- "traefik.http.routers.joomlatools-server-tunnel.rule=HostRegexp(`{name:(.*)}.trycloudflare.com`)"
- "traefik.http.routers.joomlatools-server-tunnel.entrypoints=web"
- "traefik.http.routers.joomlatools-server-http.rule=HostRegexp(`{name:(.*)}.test`)"
- "traefik.http.routers.joomlatools-server-http.entrypoints=web"
- "traefik.http.routers.joomlatools-server-https.rule=HostRegexp(`{name:(.*)}.test`)"
- "traefik.http.routers.joomlatools-server-https.entrypoints=websecure"
- "traefik.http.routers.joomlatools-server-https.tls=true"
# Services
- "traefik.http.services.joomlatools-server.loadbalancer.server.port=80"
volumes:
- ./sites/:/var/www/sites
# Sites Cache
- ./data/sites:/mnt/www/sites
# MySQL Data
- ./data/mysql:/mnt/www/mysql
#- mysql:/mnt/www/mysql
# Include any of the following for local development
# Composer Vendor
#- ./vendor:/tmp/www/vendor
# Joomlatools Framework
#- ~/Projects/joomlatools-framework:/var/www/[site]/joomla/libraries/joomlatools/code
# Joomlatools Pages
#- ~/Projects/joomlatools-pages:/var/www/sites/[site]/libraries/joomlatools-components/pages/code
ports:
#- "80:80" # HTTP Apache
#- "443:443" # HTTPS Apache
- "8080:8080" # HTTP Apache
- "8443:8443" # HTTPS Apache
- "3306:3306" # MySQL
- "33060:33060" # MySQL - X Plugin
cap_add:
- SYS_NICE
networks:
- joomlatools-server
#docker compose --profile dns up
dnsmasq:
profiles: [ "dns", "all" ]
image: 4km3/dnsmasq
container_name: joomlatools-dns
restart: unless-stopped
depends_on:
- joomlatools-server
ports:
- "53:53/tcp"
- "53:53/udp"
cap_add:
- NET_ADMIN
volumes:
- type: bind
source: ./config/dnsmasq/dnsmasq.conf
target: /etc/dnsmasq.conf
networks:
- joomlatools-server
traefik:
profiles: [ "dns", "all" ]
image: traefik:v2.7
container_name: joomlatools-proxy
restart: unless-stopped
depends_on:
- joomlatools-server
command:
- "--log.level=INFO"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--providers.file.directory=/app/certificates"
ports:
- "80:80"
- "443:443"
- "8280:8080" # The Web UI (enabled by --api)
labels:
- "traefik.enable=true"
# Routers
- "traefik.http.routers.traefik-http.rule=Host(`traefik.localhost`)"
- "traefik.http.routers.traefik-http.entrypoints=web"
- "traefik.http.routers.traefik-https.rule=Host(`traefik.localhost`)"
- "traefik.http.routers.traefik-https.entrypoints=websecure"
- "traefik.http.routers.traefik-https.tls=true"
- "traefik.http.routers.traefik-http.service=api@internal"
- "traefik.http.routers.traefik-https.service=api@internal"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data/certificates:/app/certificates
networks:
- joomlatools-server
minica:
profiles: [ "dns", "dashboard", "all" ]
image: ghcr.io/bjornsnoen/minica-traefik-api:latest
container_name: joomlatools-certca
restart: unless-stopped
depends_on:
- joomlatools-server
volumes:
- ./data/certificates:/app/certificates
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
DOCKER_HOST: "unix:///var/run/docker.sock"
DOCKER_LISTEN: "yes"
ports:
- "8580:80" # The API
labels:
- "traefik.enable=true"
# Routers
- "traefik.http.routers.minica-http.rule=Host(`minica.localhost`)"
- "traefik.http.routers.minica-http.entrypoints=web"
- "traefik.http.routers.minica-https.rule=Host(`minica.localhost`)"
- "traefik.http.routers.minica-https.entrypoints=websecure"
- "traefik.http.routers.minica-https.tls=true"
# Services
- "traefik.http.services.minica.loadbalancer.server.port=80"
networks:
- joomlatools-server
#docker compose --profile phpmyadmin up
phpmyadmin:
profiles: ["phpmyadmin", "all"]
image: phpmyadmin
container_name: joomlatools-phpmyadmin
restart: unless-stopped
depends_on:
- joomlatools-server
environment:
- PMA_HOST=joomlatools-server
- PMA_VERBOSE=joomlatools-server
- PMA_PORT=3306
- PMA_ARBITRARY=1
- PMA_USER=admin
- PMA_PASSWORD=admin
- PMA_ABSOLUTE_URL=http://phpmyadmin.localhost
ports:
- "8180:80" # phpMyAdmin Server
labels:
- "traefik.enable=true"
# Routers
- "traefik.http.routers.phpmyadmin-http.rule=Host(`phpmyadmin.localhost`)"
- "traefik.http.routers.phpmyadmin-http.entrypoints=web"
- "traefik.http.routers.phpmyadmin-https.rule=Host(`phpmyadmin.localhost`)"
- "traefik.http.routers.phpmyadmin-https.entrypoints=websecure"
- "traefik.http.routers.phpmyadmin-https.tls=true"
# Services
- "traefik.http.services.phpmyadmin.loadbalancer.server.port=80"
networks:
- joomlatools-server
#docker compose --profile mailhog up
mailhog:
profiles: ["mailhog", "all"]
image: mailhog/mailhog
container_name: joomlatools-mailhog
restart: unless-stopped
depends_on:
- joomlatools-server
ports:
- "1025:1025" # smtp server
- "8380:8025" # http server
labels:
- "traefik.enable=true"
# Routers
- "traefik.http.routers.mailhog-http.rule=Host(`mailhog.localhost`)"
- "traefik.http.routers.mailhog-http.entrypoints=web"
- "traefik.http.routers.mailhog-https.rule=Host(`mailhog.localhost`)"
- "traefik.http.routers.mailhog-https.entrypoints=websecure"
- "traefik.http.routers.mailhog-https.tls=true"
# Services
- "traefik.http.services.mailhog.loadbalancer.server.port=8025"
networks:
- joomlatools-server
#docker compose --profile dozzle up
dozzle:
profiles: ["dozzle", "all"]
image: amir20/dozzle:latest
container_name: joomlatools-logs
restart: unless-stopped
depends_on:
- joomlatools-server
environment:
DOZZLE_LEVEL: info
DOZZLE_TAILSIZE: 300
DOZZLE_FILTER: "status=running"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "8480:8080"
labels:
- "traefik.enable=true"
# Routers
- "traefik.http.routers.dozzle-http.rule=Host(`dozzle.localhost`)"
- "traefik.http.routers.dozzle-http.entrypoints=web"
- "traefik.http.routers.dozzle-https.rule=Host(`dozzle.localhost`)"
- "traefik.http.routers.dozzle-https.entrypoints=websecure"
- "traefik.http.routers.dozzle-https.tls=true"
# Services
- "traefik.http.services.dozzle.loadbalancer.server.port=8080"
networks:
- joomlatools-server