-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnextcloud-stack-4-swarm-epe.yml
More file actions
167 lines (154 loc) · 3.54 KB
/
nextcloud-stack-4-swarm-epe.yml
File metadata and controls
167 lines (154 loc) · 3.54 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
# stack name "nextcloud"
version: '3.7'
x-environment: &common-vars
MYSQL_PASSWORD:
MYSQL_DATABASE:
MYSQL_USER:
MYSQL_ROOT_PASSWORD:
TZ: Europe/Rome
UPLOAD_MAX_SIZE: 20G
x-default-opts:
&default-opts
deploy:
restart_policy:
condition: on-failure
delay: 5s
#max_attempts: 3
window: 20s
services:
nginx:
image: nginx:1.22
hostname: nginx
<<: *default-opts
ports:
- target: 80
published: 89
protocol: tcp
mode: host
volumes:
- /srv/data/nextcloud/nginx/nextcloud.conf:/etc/nginx/nginx.conf:ro
- app:/var/www/html
- nc_custom_apps:/var/www/html/custom_apps
- nc_config:/var/www/html/config
- logs:/var/log/nginx
- /srv/data/nextcloud/nginx/entrypoint.sh:/entrypoint.sh:ro
environment:
TZ: Europe/Rome
WAITFOR: app:ping
depends_on:
- app
entrypoint: ["/entrypoint.sh"]
command: ["nginx", "-g", "daemon off;"]
stop_grace_period: 20s
app:
image: nextcloud:23-fpm
hostname: app
<<: *default-opts
volumes:
- app:/var/www/html
- nc_custom_apps:/var/www/html/custom_apps
- nc_config:/var/www/html/config
- testi:/testi
environment:
TZ: Europe/Rome
REDIS_HOST: redis
MYSQL_HOST : db
<< : *common-vars
depends_on:
- db
- redis
stop_grace_period: 20s
cron:
image: nextcloud:23-fpm
hostname: cron
<<: *default-opts
volumes:
- app:/var/www/html
- nc_custom_apps:/var/www/html/custom_apps
- nc_config:/var/www/html/config
environment:
TZ: Europe/Rome
<< : *common-vars
entrypoint: /cron.sh
depends_on:
- db
- redis
stop_grace_period: 20s
db:
image: mariadb:10.8
hostname: db
<<: *default-opts
volumes:
- db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD_FILE: /var/lib/mysql/db-root.pwd
MYSQL_PASSWORD_FILE: /var/lib/mysql/db-nextcloud.pwd
MYSQL_DATABASE_FILE: /var/lib/mysql/db-name.txt
MYSQL_USER_FILE: /var/lib/mysql/db-user.txt
TZ: Europe/Rome
healthcheck:
test: ["CMD", "/bin/bash", "-c", "read p < $$MYSQL_PASSWORD_FILE ; read u < $$MYSQL_USER_FILE ; mysql -p$$p -u$$u -e status | grep Uptime || (echo \"MariaDB is down\" && exit 1)"]
interval: 30s
timeout: 30s
start_period: 5s
retries: 20
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
redis:
image: redis:7-alpine
hostname: redis
<<: *default-opts
environment:
TZ: Europe/Rome
volumes:
- redis:/data
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
<< : *common-vars
PMA_HOST: db
PMA_PORT: 3306
ports:
- '8288:80'
depends_on:
- db
volumes:
common_data:
driver: local
logs:
driver: local
driver_opts:
type: none
o: bind
device: /srv/data/logs/nextcloud
db:
driver: local
driver_opts:
type: none
o: bind
device: /srv/data/databases/nextcloud
app:
driver: local
driver_opts:
type: none
o: bind
device: /srv/data/nextcloud/app/html
nc_custom_apps:
driver: local
driver_opts:
type: none
o: bind
device: /srv/data/nextcloud/app/custom_apps
nc_config:
driver: local
driver_opts:
type: none
o: bind
device: /srv/data/nextcloud/app/config
redis:
driver: local
testi:
driver: local
driver_opts:
type: none
o: bind
device: /media/apps/testi