-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
197 lines (180 loc) · 5.17 KB
/
Copy pathdocker-compose.yml
File metadata and controls
197 lines (180 loc) · 5.17 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
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
name: nextcloud
x-nextcloud-version: &nextcloud-version '34.0.2'
# Nextcloud Stack
#
# Author: Andreaux
# URL: https://github.com/Andreaux/Nextcloud-Docker-Compose
#
# 1. Nextcloud
# 2. MariaDB
# 3. Redis
# 4. Nextcloud-cronjobs
# 5. Collabora
# 6. HaRP (Nextcloud AppAPI reverse proxy)
# 7. WebSocket Server for Real-time Collaboration
services:
# 1. Nextcloud (NOTE: update the version in the x-nextcloud-version anchor above if needed!)
nextcloud:
build:
context: .
dockerfile: Dockerfile
args:
NEXTCLOUD_VERSION: *nextcloud-version
image: nextcloud-custom:local
container_name: nextcloud
depends_on:
db:
condition: service_healthy
collabora:
condition: service_started
redis:
condition: service_healthy
volumes:
- ./nextclouddata:/var/www/html
restart: unless-stopped
hostname: nc
environment:
- PHP_MEMORY_LIMIT=2048M
- PHP_UPLOAD_LIMIT=1024M
- REDIS_HOST=redis
- REDIS_PORT=6379
- 'REDIS_HOST_PASSWORD=${REDIS_PASSWORD}'
networks:
- proxy
ports:
# These ports are in format <host-port>:<container-port>
# Only needed if you want to reach NC directly from the host.
# If your reverse proxy (NPM) is also in Docker and on the "proxy" network,
# you can remove these and point NPM directly to http://nextcloud:80.
- '9000:80'
# - '9443:443'
# 2. MariaDB
db:
image: mariadb:11.5.2
container_name: ncdb
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
MYSQL_DATABASE: 'nextcloud'
MYSQL_USER: 'nextcloud'
MYSQL_PASSWORD: '${MYSQL_PASSWORD}'
MARIADB_AUTO_UPGRADE: '1'
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
start_period: 1m
volumes:
- ./mysql:/var/lib/mysql
networks:
- proxy
# ports:
# - '3306:3306' # MySQL Port
# 3. Redis
redis:
image: redis:alpine
container_name: redis
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD}
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "--no-auth-warning", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- proxy
# ports:
# - '6379:6379'
# 4. Nextcloud-cronjob
nextcloud-cronjob:
image: rcdailey/nextcloud-cronjob
container_name: nextcloud-cronjob
depends_on:
nextcloud:
condition: service_started
volumes:
- ./nextclouddata:/var/www/html
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
environment:
- NEXTCLOUD_CONTAINER_NAME=nextcloud
# - NEXTCLOUD_PROJECT_NAME=nextcloud
- NEXTCLOUD_CRON_MINUTE_INTERVAL=5
- NEXTCLOUD_EXEC_SHELL=bash
- NEXTCLOUD_EXEC_SHELL_ARGS=-c
- NEXTCLOUD_EXEC_USER=www-data
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
networks:
- proxy
# 5. Collabora
collabora:
image: collabora/code:latest
container_name: collabora
hostname: collabora
volumes:
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
# - /srv/nextcloud/collabora/coolmount-patch/coolmount:/usr/bin/coolmount:ro
# - /srv/nextcloud/collabora/coolmount-patch/coolmount.real:/usr/bin/coolmount.real:ro
restart: unless-stopped
environment:
# Set your dictionary languages below. Remove any unnecessary, add missing ones.
- "dictionaries=en_US,hu_HU,fr_FR,de_DE"
- "domain=${ESCAPED_COLLABORA_DOMAINNAME}"
- "extra_params=--o:ssl.enable=false --o:ssl.termination=true"
- "LC_CTYPE=C.UTF-8"
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- "username=admin"
- "password=${COLLABORA_PASSWORD}"
- "VIRTUAL_HOST=ca.${DOMAINNAME}"
- "VIRTUAL_PORT=9980"
- "VIRTUAL_PROTO=https"
networks:
- proxy
# 6. HaRP (Nextcloud AppAPI reverse proxy)
appapi-harp:
image: ghcr.io/nextcloud/nextcloud-appapi-harp:release
container_name: appapi-harp
depends_on:
nextcloud:
condition: service_started
hostname: appapi-harp
restart: unless-stopped
environment:
HP_SHARED_KEY: '${HP_SHARED_KEY}'
NC_INSTANCE_URL: 'https://nc.${DOMAINNAME}'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./certs:/certs
ports:
- '8780:8780'
- '8782:8782'
networks:
- proxy
# 7. WebSocket Server for Real-time Collaboration
#
# Don't forget to add the custom location for the Whiteboard to Nginx.
# See README.md for what to set.
#
nextcloud-whiteboard-server:
image: ghcr.io/nextcloud/whiteboard:stable
container_name: whiteboard
depends_on:
nextcloud:
condition: service_started
ports:
- "3002:3002"
restart: unless-stopped
environment:
NEXTCLOUD_URL: https://nc.${DOMAINNAME}
JWT_SECRET_KEY: ${WHITEBOARD_JWT_SECRET}
MAX_UPLOAD_FILE_SIZE: 20971520
networks:
- proxy
networks:
proxy:
name: proxy
driver: bridge