File tree 11 files changed +169
-9
lines changed
11 files changed +169
-9
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
156
156
exit 1
157
157
fi
158
158
159
+ need_initialization=false
160
+
159
161
if version_greater " $image_version " " $installed_version " ; then
162
+ need_initialization=true
163
+ fi
164
+
165
+ if [ -f /tmp/nextcloud-force-initialization ]; then
166
+ echo Found /tmp/nextcloud-force-initialization, forcing initialization
167
+ need_initialization=true
168
+ fi
169
+
170
+ if [ " true" = " $need_initialization " ]; then
160
171
echo " Initializing nextcloud $image_version ..."
161
172
if [ " $installed_version " != " 0.0.0.0" ]; then
162
173
if [ " ${image_version%% .* } " -gt " $(( ${installed_version%% .* } + 1 )) " ]; then
@@ -248,7 +259,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
248
259
fi
249
260
250
261
run_path post-installation
251
- fi
262
+ fi
252
263
fi
253
264
# not enough specified to do a fully automated installation
254
265
if [ " $install " = false ]; then
@@ -269,6 +280,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
269
280
run_path post-upgrade
270
281
fi
271
282
283
+ if [ -f /tmp/nextcloud-force-initialization ]; then
284
+ rm /tmp/nextcloud-force-initialization
285
+ fi
286
+
272
287
echo " Initializing finished"
273
288
fi
274
289
Original file line number Diff line number Diff line change @@ -156,7 +156,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
156
156
exit 1
157
157
fi
158
158
159
+ need_initialization=false
160
+
159
161
if version_greater " $image_version " " $installed_version " ; then
162
+ need_initialization=true
163
+ fi
164
+
165
+ if [ -f /tmp/nextcloud-force-initialization ]; then
166
+ echo Found /tmp/nextcloud-force-initialization, forcing initialization
167
+ need_initialization=true
168
+ fi
169
+
170
+ if [ " true" = " $need_initialization " ]; then
160
171
echo " Initializing nextcloud $image_version ..."
161
172
if [ " $installed_version " != " 0.0.0.0" ]; then
162
173
if [ " ${image_version%% .* } " -gt " $(( ${installed_version%% .* } + 1 )) " ]; then
@@ -248,7 +259,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
248
259
fi
249
260
250
261
run_path post-installation
251
- fi
262
+ fi
252
263
fi
253
264
# not enough specified to do a fully automated installation
254
265
if [ " $install " = false ]; then
@@ -269,6 +280,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
269
280
run_path post-upgrade
270
281
fi
271
282
283
+ if [ -f /tmp/nextcloud-force-initialization ]; then
284
+ rm /tmp/nextcloud-force-initialization
285
+ fi
286
+
272
287
echo " Initializing finished"
273
288
fi
274
289
Original file line number Diff line number Diff line change @@ -156,7 +156,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
156
156
exit 1
157
157
fi
158
158
159
+ need_initialization=false
160
+
159
161
if version_greater " $image_version " " $installed_version " ; then
162
+ need_initialization=true
163
+ fi
164
+
165
+ if [ -f /tmp/nextcloud-force-initialization ]; then
166
+ echo Found /tmp/nextcloud-force-initialization, forcing initialization
167
+ need_initialization=true
168
+ fi
169
+
170
+ if [ " true" = " $need_initialization " ]; then
160
171
echo " Initializing nextcloud $image_version ..."
161
172
if [ " $installed_version " != " 0.0.0.0" ]; then
162
173
if [ " ${image_version%% .* } " -gt " $(( ${installed_version%% .* } + 1 )) " ]; then
@@ -248,7 +259,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
248
259
fi
249
260
250
261
run_path post-installation
251
- fi
262
+ fi
252
263
fi
253
264
# not enough specified to do a fully automated installation
254
265
if [ " $install " = false ]; then
@@ -269,6 +280,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
269
280
run_path post-upgrade
270
281
fi
271
282
283
+ if [ -f /tmp/nextcloud-force-initialization ]; then
284
+ rm /tmp/nextcloud-force-initialization
285
+ fi
286
+
272
287
echo " Initializing finished"
273
288
fi
274
289
Original file line number Diff line number Diff line change @@ -156,7 +156,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
156
156
exit 1
157
157
fi
158
158
159
+ need_initialization=false
160
+
159
161
if version_greater " $image_version " " $installed_version " ; then
162
+ need_initialization=true
163
+ fi
164
+
165
+ if [ -f /tmp/nextcloud-force-initialization ]; then
166
+ echo Found /tmp/nextcloud-force-initialization, forcing initialization
167
+ need_initialization=true
168
+ fi
169
+
170
+ if [ " true" = " $need_initialization " ]; then
160
171
echo " Initializing nextcloud $image_version ..."
161
172
if [ " $installed_version " != " 0.0.0.0" ]; then
162
173
if [ " ${image_version%% .* } " -gt " $(( ${installed_version%% .* } + 1 )) " ]; then
@@ -248,7 +259,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
248
259
fi
249
260
250
261
run_path post-installation
251
- fi
262
+ fi
252
263
fi
253
264
# not enough specified to do a fully automated installation
254
265
if [ " $install " = false ]; then
@@ -269,6 +280,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
269
280
run_path post-upgrade
270
281
fi
271
282
283
+ if [ -f /tmp/nextcloud-force-initialization ]; then
284
+ rm /tmp/nextcloud-force-initialization
285
+ fi
286
+
272
287
echo " Initializing finished"
273
288
fi
274
289
Original file line number Diff line number Diff line change @@ -156,7 +156,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
156
156
exit 1
157
157
fi
158
158
159
+ need_initialization=false
160
+
159
161
if version_greater " $image_version " " $installed_version " ; then
162
+ need_initialization=true
163
+ fi
164
+
165
+ if [ -f /tmp/nextcloud-force-initialization ]; then
166
+ echo Found /tmp/nextcloud-force-initialization, forcing initialization
167
+ need_initialization=true
168
+ fi
169
+
170
+ if [ " true" = " $need_initialization " ]; then
160
171
echo " Initializing nextcloud $image_version ..."
161
172
if [ " $installed_version " != " 0.0.0.0" ]; then
162
173
if [ " ${image_version%% .* } " -gt " $(( ${installed_version%% .* } + 1 )) " ]; then
@@ -248,7 +259,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
248
259
fi
249
260
250
261
run_path post-installation
251
- fi
262
+ fi
252
263
fi
253
264
# not enough specified to do a fully automated installation
254
265
if [ " $install " = false ]; then
@@ -269,6 +280,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
269
280
run_path post-upgrade
270
281
fi
271
282
283
+ if [ -f /tmp/nextcloud-force-initialization ]; then
284
+ rm /tmp/nextcloud-force-initialization
285
+ fi
286
+
272
287
echo " Initializing finished"
273
288
fi
274
289
Original file line number Diff line number Diff line change @@ -156,7 +156,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
156
156
exit 1
157
157
fi
158
158
159
+ need_initialization=false
160
+
159
161
if version_greater " $image_version " " $installed_version " ; then
162
+ need_initialization=true
163
+ fi
164
+
165
+ if [ -f /tmp/nextcloud-force-initialization ]; then
166
+ echo Found /tmp/nextcloud-force-initialization, forcing initialization
167
+ need_initialization=true
168
+ fi
169
+
170
+ if [ " true" = " $need_initialization " ]; then
160
171
echo " Initializing nextcloud $image_version ..."
161
172
if [ " $installed_version " != " 0.0.0.0" ]; then
162
173
if [ " ${image_version%% .* } " -gt " $(( ${installed_version%% .* } + 1 )) " ]; then
@@ -248,7 +259,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
248
259
fi
249
260
250
261
run_path post-installation
251
- fi
262
+ fi
252
263
fi
253
264
# not enough specified to do a fully automated installation
254
265
if [ " $install " = false ]; then
@@ -269,6 +280,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
269
280
run_path post-upgrade
270
281
fi
271
282
283
+ if [ -f /tmp/nextcloud-force-initialization ]; then
284
+ rm /tmp/nextcloud-force-initialization
285
+ fi
286
+
272
287
echo " Initializing finished"
273
288
fi
274
289
Original file line number Diff line number Diff line change @@ -156,7 +156,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
156
156
exit 1
157
157
fi
158
158
159
+ need_initialization=false
160
+
159
161
if version_greater " $image_version " " $installed_version " ; then
162
+ need_initialization=true
163
+ fi
164
+
165
+ if [ -f /tmp/nextcloud-force-initialization ]; then
166
+ echo Found /tmp/nextcloud-force-initialization, forcing initialization
167
+ need_initialization=true
168
+ fi
169
+
170
+ if [ " true" = " $need_initialization " ]; then
160
171
echo " Initializing nextcloud $image_version ..."
161
172
if [ " $installed_version " != " 0.0.0.0" ]; then
162
173
if [ " ${image_version%% .* } " -gt " $(( ${installed_version%% .* } + 1 )) " ]; then
@@ -248,7 +259,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
248
259
fi
249
260
250
261
run_path post-installation
251
- fi
262
+ fi
252
263
fi
253
264
# not enough specified to do a fully automated installation
254
265
if [ " $install " = false ]; then
@@ -269,6 +280,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
269
280
run_path post-upgrade
270
281
fi
271
282
283
+ if [ -f /tmp/nextcloud-force-initialization ]; then
284
+ rm /tmp/nextcloud-force-initialization
285
+ fi
286
+
272
287
echo " Initializing finished"
273
288
fi
274
289
Original file line number Diff line number Diff line change @@ -156,7 +156,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
156
156
exit 1
157
157
fi
158
158
159
+ need_initialization=false
160
+
159
161
if version_greater " $image_version " " $installed_version " ; then
162
+ need_initialization=true
163
+ fi
164
+
165
+ if [ -f /tmp/nextcloud-force-initialization ]; then
166
+ echo Found /tmp/nextcloud-force-initialization, forcing initialization
167
+ need_initialization=true
168
+ fi
169
+
170
+ if [ " true" = " $need_initialization " ]; then
160
171
echo " Initializing nextcloud $image_version ..."
161
172
if [ " $installed_version " != " 0.0.0.0" ]; then
162
173
if [ " ${image_version%% .* } " -gt " $(( ${installed_version%% .* } + 1 )) " ]; then
@@ -248,7 +259,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
248
259
fi
249
260
250
261
run_path post-installation
251
- fi
262
+ fi
252
263
fi
253
264
# not enough specified to do a fully automated installation
254
265
if [ " $install " = false ]; then
@@ -269,6 +280,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
269
280
run_path post-upgrade
270
281
fi
271
282
283
+ if [ -f /tmp/nextcloud-force-initialization ]; then
284
+ rm /tmp/nextcloud-force-initialization
285
+ fi
286
+
272
287
echo " Initializing finished"
273
288
fi
274
289
Original file line number Diff line number Diff line change @@ -156,7 +156,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
156
156
exit 1
157
157
fi
158
158
159
+ need_initialization=false
160
+
159
161
if version_greater " $image_version " " $installed_version " ; then
162
+ need_initialization=true
163
+ fi
164
+
165
+ if [ -f /tmp/nextcloud-force-initialization ]; then
166
+ echo Found /tmp/nextcloud-force-initialization, forcing initialization
167
+ need_initialization=true
168
+ fi
169
+
170
+ if [ " true" = " $need_initialization " ]; then
160
171
echo " Initializing nextcloud $image_version ..."
161
172
if [ " $installed_version " != " 0.0.0.0" ]; then
162
173
if [ " ${image_version%% .* } " -gt " $(( ${installed_version%% .* } + 1 )) " ]; then
@@ -248,7 +259,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
248
259
fi
249
260
250
261
run_path post-installation
251
- fi
262
+ fi
252
263
fi
253
264
# not enough specified to do a fully automated installation
254
265
if [ " $install " = false ]; then
@@ -269,6 +280,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
269
280
run_path post-upgrade
270
281
fi
271
282
283
+ if [ -f /tmp/nextcloud-force-initialization ]; then
284
+ rm /tmp/nextcloud-force-initialization
285
+ fi
286
+
272
287
echo " Initializing finished"
273
288
fi
274
289
Original file line number Diff line number Diff line change @@ -393,6 +393,16 @@ To use the hooks triggered by the `entrypoint` script, either
393
393
...
394
394
```
395
395
396
+ ## Forcing an upgrade run
397
+
398
+ Sometimes you need to force an explicit upgrade run even when the bundled Nextcloud version did not change.
399
+ An example would be when you have custom apps bundled and you want to update those.
400
+
401
+ To do this, you can simply create a file ` /tmp/nextcloud-force-initialization ` before the need for an upgrade is determined.
402
+ The content is irrelevant.
403
+ You can either create this file before starting the container, or you can use the ` pre-initialization ` hook to create it.
404
+ After the update has successfully run, the file is removed automatically.
405
+
396
406
# Running this image with ` docker compose `
397
407
The easiest way to get a fully featured and functional setup is using a ` compose.yaml ` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for.
398
408
Original file line number Diff line number Diff line change @@ -156,7 +156,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
156
156
exit 1
157
157
fi
158
158
159
+ need_initialization=false
160
+
159
161
if version_greater " $image_version " " $installed_version " ; then
162
+ need_initialization=true
163
+ fi
164
+
165
+ if [ -f /tmp/nextcloud-force-initialization ]; then
166
+ echo Found /tmp/nextcloud-force-initialization, forcing initialization
167
+ need_initialization=true
168
+ fi
169
+
170
+ if [ " true" = " $need_initialization " ]; then
160
171
echo " Initializing nextcloud $image_version ..."
161
172
if [ " $installed_version " != " 0.0.0.0" ]; then
162
173
if [ " ${image_version%% .* } " -gt " $(( ${installed_version%% .* } + 1 )) " ]; then
@@ -269,6 +280,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
269
280
run_path post-upgrade
270
281
fi
271
282
283
+ if [ -f /tmp/nextcloud-force-initialization ]; then
284
+ rm /tmp/nextcloud-force-initialization
285
+ fi
286
+
272
287
echo " Initializing finished"
273
288
fi
274
289
You can’t perform that action at this time.
0 commit comments