Use exclude file for the updater

Signed-off-by: Tilo Spannagel <development@tilosp.de>
This commit is contained in:
Tilo Spannagel 2018-10-01 15:28:13 +02:00
parent de7204ccda
commit a46493fbc4
No known key found for this signature in database
GPG Key ID: E517E9F206B8993D
5 changed files with 10 additions and 3 deletions

View File

@ -111,7 +111,7 @@ RUN set -ex; \
chmod +x /usr/src/nextcloud/occ; \
apk del .fetch-deps
COPY *.sh /
COPY *.sh upgrade.exclude /
COPY config/* /usr/src/nextcloud/config/
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -126,7 +126,7 @@ RUN set -ex; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
rm -rf /var/lib/apt/lists/*
COPY *.sh /
COPY *.sh upgrade.exclude /
COPY config/* /usr/src/nextcloud/config/
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -44,7 +44,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
else
rsync_options="-rlD"
fi
rsync $rsync_options --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then

View File

@ -85,6 +85,9 @@ function create_variant() {
cp "docker-$name.sh" "$dir/$name.sh"
done
# Copy the upgrade.exclude
cp upgrade.exclude "$dir/"
# Copy the config directory
cp -rT .config "$dir/config"

4
upgrade.exclude Normal file
View File

@ -0,0 +1,4 @@
/config/
/data/
/custom_apps/
/themes/