forked from juliusknorr/nextcloud-docker-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
364 lines (340 loc) · 11.5 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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
version: '3'
services:
# Proxy for (local) ssl termination and easier hostname access
# SSL certificates with the virtual host name need to be added to ./data/ssl
proxy:
image: ghcr.io/juliushaertl/nextcloud-dev-nginx:latest
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./data/ssl/:/etc/nginx/certs
environment:
DHPARAM_BITS: 2048
DHPARAM_GENERATION: "false"
HTTPS_METHOD: "noredirect"
HSTS: "off"
cap_add:
- SYS_ADMIN
networks:
default:
# Enable name resolution for other containers
# Same as /etc/hosts on Docker host
aliases:
- nextcloud${DOMAIN_SUFFIX_LOCAL}
- nextcloud2${DOMAIN_SUFFIX_LOCAL}
- nextcloud3${DOMAIN_SUFFIX_LOCAL}
- stable24${DOMAIN_SUFFIX_LOCAL}
- proxy${DOMAIN_SUFFIX_LOCAL}
- hpb${DOMAIN_SUFFIX_LOCAL}
- push${DOMAIN_SUFFIX_LOCAL}
- keycloak${DOMAIN_SUFFIX_LOCAL}
- portal${DOMAIN_SUFFIX_LOCAL}
- gs1${DOMAIN_SUFFIX_LOCAL}
- gs2${DOMAIN_SUFFIX_LOCAL}
- lookup${DOMAIN_SUFFIX_LOCAL}
nextcloud:
# ADD configs/autoconfig_mysql.php configs/autoconfig_pgsql.php configs/autoconfig_oci.php configs/s3.php configs/config.php configs/redis.config.php /root/
# ADD bin/bootstrap.sh bin/occ /usr/local/bin/
#image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
build:
context: ./docker
dockerfile: "./Dockerfile.php${PHP_VERSION:-74}"
environment:
SQL: ${SQL:-mysql}
# Run docker/bin/bootstrap.sh fns on container start: add_hosts; install
NEXTCLOUD_AUTOINSTALL: "YES"
NEXTCLOUD_AUTOINSTALL_APPS:
WITH_REDIS: "YES"
# https://github.com/nginx-proxy/nginx-proxy/blob/main/README.md#multiple-hosts
# https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
VIRTUAL_HOST: "nextcloud${DOMAIN_SUFFIX_LOCAL},${PUBLIC_ALIAS:-nc}${DOMAIN_SUFFIX_PUBLIC:-$DOMAIN_SUFFIX_LOCAL}"
NEXTCLOUD_TRUSTED_DOMAINS: "${PUBLIC_ALIAS:-nc}${DOMAIN_SUFFIX_PUBLIC:-$DOMAIN_SUFFIX_LOCAL}"
NEXTCLOUD_VIRTUAL_HOST: "nextcloud${DOMAIN_SUFFIX_LOCAL}"
NEXTCLOUD_ADMIN_PASSWORD:
volumes:
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/server}:/var/www/html'
# data and config are named volumes, not file system mounts
- data:/var/www/html/data
- config:/var/www/html/config
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
# VO Federation app mount
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/vo_federation:/var/www/html/apps-extra/vo_federation'
ports:
- "${PORTBASE:-800}0:80"
depends_on:
- ${DB_SERVICE:-database-mysql}
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
nextcloud2:
build:
context: ./docker
dockerfile: "./Dockerfile.php${PHP_VERSION:-74}"
environment:
SQL: ${SQL:-mysql}
VIRTUAL_HOST: "nextcloud2${DOMAIN_SUFFIX_LOCAL},${PUBLIC_ALIAS2:-nc2}${DOMAIN_SUFFIX_PUBLIC:-$DOMAIN_SUFFIX_LOCAL}"
NEXTCLOUD_TRUSTED_DOMAINS: "${PUBLIC_ALIAS2:-nc2}${DOMAIN_SUFFIX_PUBLIC:-$DOMAIN_SUFFIX_LOCAL}"
NEXTCLOUD_VIRTUAL_HOST: "nextcloud2${DOMAIN_SUFFIX_LOCAL}"
NEXTCLOUD_ADMIN_PASSWORD:
volumes:
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/server}:/var/www/html'
- data2:/var/www/html/data
- config2:/var/www/html/config
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/vo_federation:/var/www/html/apps-extra/vo_federation'
ports:
- "${PORTBASE:-800}1:80"
depends_on:
- database-mysql
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
nextcloud3:
build:
context: ./docker
dockerfile: "./Dockerfile.php${PHP_VERSION:-74}"
environment:
SQL: ${SQL:-mysql}
VIRTUAL_HOST: "nextcloud3${DOMAIN_SUFFIX_LOCAL},${PUBLIC_ALIAS3:-nc3}${DOMAIN_SUFFIX_PUBLIC:-$DOMAIN_SUFFIX_LOCAL}"
NEXTCLOUD_TRUSTED_DOMAINS: "${PUBLIC_ALIAS3:-nc3}${DOMAIN_SUFFIX_PUBLIC:-$DOMAIN_SUFFIX_LOCAL}"
NEXTCLOUD_VIRTUAL_HOST: "nextcloud3${DOMAIN_SUFFIX_LOCAL}"
NEXTCLOUD_ADMIN_PASSWORD:
volumes:
- '${REPO_PATH_SERVER:-/home/jus/repos/nextcloud/server}:/var/www/html'
- data3:/var/www/html/data
- config3:/var/www/html/config
- '${ADDITIONAL_APPS_PATH:-./data/apps-extra}:/var/www/html/apps-extra'
- /var/www/html/apps-writable
- ./data/skeleton/:/skeleton
- ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
- ./data/shared:/shared
- '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/vo_federation:/var/www/html/apps-extra/vo_federation'
ports:
- "${PORTBASE:-800}2:80"
depends_on:
- database-mysql
- redis
- mail
extra_hosts:
- host.docker.internal:host-gateway
# stable24:
# image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
# environment:
# SQL: 'mysql'
# NEXTCLOUD_AUTOINSTALL: "YES"
# NEXTCLOUD_AUTOINSTALL_APPS:
# WITH_REDIS: "YES"
# VIRTUAL_HOST: stable24${DOMAIN_SUFFIX_LOCAL}
# ADDITIONAL_APPS_PATH:
# NEXTCLOUD_TRUSTED_DOMAINS:
# volumes:
# - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable24:/var/www/html'
# - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/stable24/apps-extra:/var/www/html/apps-extra'
# - /var/www/html/data
# - /var/www/html/config
# - /var/www/html/apps-writable
# - ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
# depends_on:
# - redis
# - mail
# extra_hosts:
# - host.docker.internal:host-gateway
database-mysql:
image: mariadb:10.5
environment:
MYSQL_ROOT_PASSWORD: 'nextcloud'
MYSQL_PASSWORD: 'nextcloud'
MYSQL_USER: 'nextcloud'
MYSQL_DATABASE: 'nextcloud'
ports:
- "${PORTBASE:-800}6:3306"
volumes:
- mysql:/var/lib/mysql
# database-postgres:
# image: postgres:latest
# environment:
# POSTGRES_PASSWORD: postgres
# expose:
# - 5432
# volumes:
# - postgres:/var/lib/postgresql
redis:
image: redis:6
ldap:
image: osixia/openldap
command: --copy-service --loglevel debug
expose:
- 389
- 636
ports:
- 3389:389
environment:
LDAP_DOMAIN: planetexpress.com
LDAP_BASE_DN: dc=planetexpress,dc=com
volumes:
- ./data/ldap:/container/service/slapd/assets/config/bootstrap/ldif/custom
phpmyadmin:
image: phpmyadmin
environment:
VIRTUAL_HOST: "phpmyadmin${DOMAIN_SUFFIX_LOCAL}"
PMA_ARBITRARY: 1
PMA_HOST: database-mysql
PMA_USER: root
PMA_PASSWORD: nextcloud
restart: always
ldapadmin:
image: osixia/phpldapadmin
environment:
PHPLDAPADMIN_LDAP_HOSTS: ldap
PHPLDAPADMIN_HTTPS: 'false'
ports:
- "${PORTBASE:-800}8:80"
saml:
image: unicon/simplesamlphp
volumes:
- ./docker/configs/var-simplesamlphp/config:/var/simplesamlphp/config
- ./docker/configs/var-simplesamlphp/cert:/var/simplesamlphp/cert
- ./docker/configs/var-simplesamlphp/metadata:/var/simplesamlphp/metadata
environment:
VIRTUAL_HOST: "sso${DOMAIN_SUFFIX_LOCAL}"
expose:
- 80
mail:
image: ghcr.io/juliushaertl/nextcloud-dev-mailhog:latest
environment:
VIRTUAL_HOST: "mail${DOMAIN_SUFFIX_LOCAL}"
VIRTUAL_PORT: 8025
# blackfire:
# image: blackfire/blackfire:2
# ports:
# - 8307:8307
# environment:
# - BLACKFIRE_SERVER_ID
# - BLACKFIRE_SERVER_TOKEN
# - BLACKFIRE_CLIENT_ID
# - BLACKFIRE_CLIENT_TOKEN
# - BLACKFIRE_DISABLE_LEGACY_PORT=yes
# push:
# image: icewind1991/notify_push
# ports:
# - '8191:80'
# environment:
# RUST_LOG: debug
# VIRTUAL_HOST: push${DOMAIN_SUFFIX_LOCAL}
# VIRTUAL_PORT: 8191
# DATABASE_URL: mysql://nextcloud:nextcloud@master_database-mysql_1/nextcloud
# REDIS_URL: redis://redis
# NEXTCLOUD_URL: https://nextcloud.local.dev.bitgrid.net
keycloak:
image: ${CONTAINER_KEYCLOAK:-quay.io/keycloak/keycloak:15.0.1}
expose:
- 8080
volumes:
- ./docker/configs/keycloak:/tmp/keycloak
environment:
VIRTUAL_HOST: "keycloak${DOMAIN_SUFFIX_LOCAL}"
VIRTUAL_PORT: 8080
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
PROXY_ADDRESS_FORWARDING: "true"
KEYCLOAK_IMPORT: /tmp/keycloak/realm-export.json
# portal:
# image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
# environment:
# VIRTUAL_HOST: portal${DOMAIN_SUFFIX_LOCAL}
# SQL: 'mysql'
# GS_MODE: master
# volumes:
# - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server:/var/www/html'
# - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server/apps-extra:/var/www/html/apps-extra'
# - /var/www/html/data
# - /var/www/html/config
# - ./data/skeleton/:/skeleton
# - ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
# depends_on:
# - proxy
# - database-mysql
# - lookup
# - redis
# - mail
# extra_hosts:
# - host.docker.internal:host-gateway
# gs1:
# image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
# environment:
# VIRTUAL_HOST: gs1${DOMAIN_SUFFIX_LOCAL}
# SQL: 'mysql'
# GS_MODE: slave
# volumes:
# - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server:/var/www/html'
# - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server/apps-extra:/var/www/html/apps-extra'
# - /var/www/html/data
# - /var/www/html/config
# - ./data/skeleton/:/skeleton
# - ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
# depends_on:
# - proxy
# - portal
# - database-mysql
# - lookup
# - redis
# - mail
# extra_hosts:
# - host.docker.internal:host-gateway
# gs2:
# image: ghcr.io/juliushaertl/nextcloud-dev-php${PHP_VERSION:-74}:latest
# environment:
# VIRTUAL_HOST: gs2${DOMAIN_SUFFIX_LOCAL}
# SQL: 'mysql'
# GS_MODE: slave
# volumes:
# - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server:/var/www/html'
# - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/server/apps-extra:/var/www/html/apps-extra'
# - /var/www/html/data
# - /var/www/html/config
# - ./data/skeleton/:/skeleton
# - ./data/additional.config.php:/var/www/html/config/additional.config.php:ro
# depends_on:
# - proxy
# - portal
# - database-mysql
# - lookup
# - redis
# - mail
# extra_hosts:
# - host.docker.internal:host-gateway
# lookup:
# image: ghcr.io/juliushaertl/nextcloud-dev-lookupserver:latest
# environment:
# VIRTUAL_HOST: "lookup${DOMAIN_SUFFIX_LOCAL}"
# # volumes:
# # - '${STABLE_ROOT_PATH:-/home/jus/repos/nextcloud}/lookupserver:/var/www/html'
# extra_hosts:
# - host.docker.internal:host-gateway
volumes:
data:
config:
mysql:
# postgres:
data2:
config2:
data3:
config3:
networks:
default:
ipam:
driver: default
config:
- subnet: ${DOCKER_SUBNET:-192.168.21.0/24}