-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (94 loc) · 2.95 KB
/
docker-compose.yml
File metadata and controls
99 lines (94 loc) · 2.95 KB
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
name: ${BASENAME}
services:
db:
image: postgres:16-alpine
container_name: ${BASENAME}-db
restart: unless-stopped
volumes:
- ./nextcloud_db:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
networks:
- proxy-net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
nextcloud:
image: nextcloud:latest
restart: unless-stopped
container_name: ${BASENAME}
depends_on:
- db
- redis
volumes:
- ${NEXTCLOUD_DATA}:/var/www/html
environment:
- POSTGRES_HOST=${BASENAME}-db
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- REDIS_HOST=${BASENAME}-redis
- PHP_MEMORY_LIMIT=2G # The Office app needs this much, optimally
- PHP_UPLOAD_LIMIT=10G # Adjust as needed, as this may be excessive
networks:
- proxy-net
labels:
- "traefik.enable=true"
- "traefik.http.routers.${BASENAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${BASENAME}.entrypoints=websecure"
- "traefik.http.routers.${BASENAME}.tls.certresolver=${RESOLVER}"
- "traefik.http.services.${BASENAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${BASENAME}.middlewares=${BASENAME}-regex"
- "traefik.http.middlewares.${BASENAME}-redirect.redirectregex.permanent=true"
- "traefik.http.middlewares.${BASENAME}-redirect.redirectregex.regex=https://(.*)/.well-known/(card|cal)dav"
- "traefik.http.middlewares.${BASENAME}-redirect.redirectregex.replacement=https://$${1}/remote.php/dav/"
- "traefik.http.middlewares.${BASENAME}-hsts.headers.stsSeconds=15552000"
- "traefik.http.middlewares.${BASENAME}-hsts.headers.stsIncludeSubdomains=true"
- "traefik.http.middlewares.${BASENAME}-hsts.headers.stsPreload=true"
- "traefik.http.routers.${BASENAME}.middlewares=${BASENAME}-redirect,${BASENAME}-hsts"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
redis:
image: redis:alpine
container_name: ${BASENAME}-redis
restart: unless-stopped
networks:
- proxy-net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
cron:
image: nextcloud:latest
container_name: ${BASENAME}-cron
restart: unless-stopped
volumes:
- ${NEXTCLOUD_DATA}:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
- redis
environment:
- POSTGRES_HOST=${BASENAME}-db
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- REDIS_HOST=${BASENAME}-redis
networks:
- proxy-net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
proxy-net:
external: true