diff options
author | Tilo Spannagel <development@tilosp.de> | 2017-04-17 22:53:39 +0200 |
---|---|---|
committer | Tilo Spannagel <development@tilosp.de> | 2017-04-17 22:53:39 +0200 |
commit | 055f5778e3f2bd3ca40fe8449f526dd97b94ccc9 (patch) | |
tree | 408cbcc1434a1d323fb34062fef7b0349858e309 | |
parent | 8f2bc6bec71b16833c4b6570a6c607aec63593b1 (diff) |
use rsync for upgrade
-rw-r--r-- | 10.0/apache/Dockerfile | 1 | ||||
-rwxr-xr-x | 10.0/apache/docker-entrypoint.sh | 13 | ||||
-rw-r--r-- | 10.0/fpm/Dockerfile | 1 | ||||
-rwxr-xr-x | 10.0/fpm/docker-entrypoint.sh | 13 | ||||
-rw-r--r-- | 11.0/apache/Dockerfile | 1 | ||||
-rwxr-xr-x | 11.0/apache/docker-entrypoint.sh | 13 | ||||
-rw-r--r-- | 11.0/fpm/Dockerfile | 1 | ||||
-rwxr-xr-x | 11.0/fpm/docker-entrypoint.sh | 13 | ||||
-rw-r--r-- | 9.0/apache/Dockerfile | 1 | ||||
-rwxr-xr-x | 9.0/apache/docker-entrypoint.sh | 13 | ||||
-rw-r--r-- | 9.0/fpm/Dockerfile | 1 | ||||
-rwxr-xr-x | 9.0/fpm/docker-entrypoint.sh | 13 | ||||
-rw-r--r-- | Dockerfile-php7.template | 1 | ||||
-rw-r--r-- | Dockerfile.template | 1 | ||||
-rwxr-xr-x | docker-entrypoint.sh | 13 |
15 files changed, 92 insertions, 7 deletions
diff --git a/10.0/apache/Dockerfile b/10.0/apache/Dockerfile index c7c580d8..54e4801e 100644 --- a/10.0/apache/Dockerfile +++ b/10.0/apache/Dockerfile @@ -1,6 +1,7 @@ FROM php:5.6-apache RUN apt-get update && apt-get install -y \ + rsync \ bzip2 \ libcurl4-openssl-dev \ libfreetype6-dev \ diff --git a/10.0/apache/docker-entrypoint.sh b/10.0/apache/docker-entrypoint.sh index 3dc4a327..01213c03 100755 --- a/10.0/apache/docker-entrypoint.sh +++ b/10.0/apache/docker-entrypoint.sh @@ -18,7 +18,18 @@ if version_greater "$installed_version" "$image_version"; then fi if version_greater "$image_version" "$installed_version"; then - tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf - + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + + if [ ! -d /var/www/html/config ]; then + cp -arT /usr/src/nextcloud/config /var/www/html/config + fi + + mkdir -p /var/www/html/apps + for app in `find /usr/src/nextcloud/apps -maxdepth 1 -mindepth 1 -type d | cut -d / -f 6`; do + rm -rf /var/www/html/apps/$app + cp -arT /usr/src/nextcloud/apps/$app /var/www/html/apps/$app + done + chown -R www-data /var/www/html fi diff --git a/10.0/fpm/Dockerfile b/10.0/fpm/Dockerfile index cdb7a346..5f4c7e2d 100644 --- a/10.0/fpm/Dockerfile +++ b/10.0/fpm/Dockerfile @@ -1,6 +1,7 @@ FROM php:5.6-fpm RUN apt-get update && apt-get install -y \ + rsync \ bzip2 \ libcurl4-openssl-dev \ libfreetype6-dev \ diff --git a/10.0/fpm/docker-entrypoint.sh b/10.0/fpm/docker-entrypoint.sh index 3dc4a327..01213c03 100755 --- a/10.0/fpm/docker-entrypoint.sh +++ b/10.0/fpm/docker-entrypoint.sh @@ -18,7 +18,18 @@ if version_greater "$installed_version" "$image_version"; then fi if version_greater "$image_version" "$installed_version"; then - tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf - + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + + if [ ! -d /var/www/html/config ]; then + cp -arT /usr/src/nextcloud/config /var/www/html/config + fi + + mkdir -p /var/www/html/apps + for app in `find /usr/src/nextcloud/apps -maxdepth 1 -mindepth 1 -type d | cut -d / -f 6`; do + rm -rf /var/www/html/apps/$app + cp -arT /usr/src/nextcloud/apps/$app /var/www/html/apps/$app + done + chown -R www-data /var/www/html fi diff --git a/11.0/apache/Dockerfile b/11.0/apache/Dockerfile index e801a80e..5217f2e7 100644 --- a/11.0/apache/Dockerfile +++ b/11.0/apache/Dockerfile @@ -1,6 +1,7 @@ FROM php:7.1-apache RUN apt-get update && apt-get install -y \ + rsync \ bzip2 \ libcurl4-openssl-dev \ libfreetype6-dev \ diff --git a/11.0/apache/docker-entrypoint.sh b/11.0/apache/docker-entrypoint.sh index 3dc4a327..01213c03 100755 --- a/11.0/apache/docker-entrypoint.sh +++ b/11.0/apache/docker-entrypoint.sh @@ -18,7 +18,18 @@ if version_greater "$installed_version" "$image_version"; then fi if version_greater "$image_version" "$installed_version"; then - tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf - + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + + if [ ! -d /var/www/html/config ]; then + cp -arT /usr/src/nextcloud/config /var/www/html/config + fi + + mkdir -p /var/www/html/apps + for app in `find /usr/src/nextcloud/apps -maxdepth 1 -mindepth 1 -type d | cut -d / -f 6`; do + rm -rf /var/www/html/apps/$app + cp -arT /usr/src/nextcloud/apps/$app /var/www/html/apps/$app + done + chown -R www-data /var/www/html fi diff --git a/11.0/fpm/Dockerfile b/11.0/fpm/Dockerfile index ea6f93ae..e703bcd1 100644 --- a/11.0/fpm/Dockerfile +++ b/11.0/fpm/Dockerfile @@ -1,6 +1,7 @@ FROM php:7.1-fpm RUN apt-get update && apt-get install -y \ + rsync \ bzip2 \ libcurl4-openssl-dev \ libfreetype6-dev \ diff --git a/11.0/fpm/docker-entrypoint.sh b/11.0/fpm/docker-entrypoint.sh index 3dc4a327..01213c03 100755 --- a/11.0/fpm/docker-entrypoint.sh +++ b/11.0/fpm/docker-entrypoint.sh @@ -18,7 +18,18 @@ if version_greater "$installed_version" "$image_version"; then fi if version_greater "$image_version" "$installed_version"; then - tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf - + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + + if [ ! -d /var/www/html/config ]; then + cp -arT /usr/src/nextcloud/config /var/www/html/config + fi + + mkdir -p /var/www/html/apps + for app in `find /usr/src/nextcloud/apps -maxdepth 1 -mindepth 1 -type d | cut -d / -f 6`; do + rm -rf /var/www/html/apps/$app + cp -arT /usr/src/nextcloud/apps/$app /var/www/html/apps/$app + done + chown -R www-data /var/www/html fi diff --git a/9.0/apache/Dockerfile b/9.0/apache/Dockerfile index b5f77401..432d60ba 100644 --- a/9.0/apache/Dockerfile +++ b/9.0/apache/Dockerfile @@ -1,6 +1,7 @@ FROM php:5.6-apache RUN apt-get update && apt-get install -y \ + rsync \ bzip2 \ libcurl4-openssl-dev \ libfreetype6-dev \ diff --git a/9.0/apache/docker-entrypoint.sh b/9.0/apache/docker-entrypoint.sh index 3dc4a327..01213c03 100755 --- a/9.0/apache/docker-entrypoint.sh +++ b/9.0/apache/docker-entrypoint.sh @@ -18,7 +18,18 @@ if version_greater "$installed_version" "$image_version"; then fi if version_greater "$image_version" "$installed_version"; then - tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf - + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + + if [ ! -d /var/www/html/config ]; then + cp -arT /usr/src/nextcloud/config /var/www/html/config + fi + + mkdir -p /var/www/html/apps + for app in `find /usr/src/nextcloud/apps -maxdepth 1 -mindepth 1 -type d | cut -d / -f 6`; do + rm -rf /var/www/html/apps/$app + cp -arT /usr/src/nextcloud/apps/$app /var/www/html/apps/$app + done + chown -R www-data /var/www/html fi diff --git a/9.0/fpm/Dockerfile b/9.0/fpm/Dockerfile index da3911df..2bab08c1 100644 --- a/9.0/fpm/Dockerfile +++ b/9.0/fpm/Dockerfile @@ -1,6 +1,7 @@ FROM php:5.6-fpm RUN apt-get update && apt-get install -y \ + rsync \ bzip2 \ libcurl4-openssl-dev \ libfreetype6-dev \ diff --git a/9.0/fpm/docker-entrypoint.sh b/9.0/fpm/docker-entrypoint.sh index 3dc4a327..01213c03 100755 --- a/9.0/fpm/docker-entrypoint.sh +++ b/9.0/fpm/docker-entrypoint.sh @@ -18,7 +18,18 @@ if version_greater "$installed_version" "$image_version"; then fi if version_greater "$image_version" "$installed_version"; then - tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf - + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + + if [ ! -d /var/www/html/config ]; then + cp -arT /usr/src/nextcloud/config /var/www/html/config + fi + + mkdir -p /var/www/html/apps + for app in `find /usr/src/nextcloud/apps -maxdepth 1 -mindepth 1 -type d | cut -d / -f 6`; do + rm -rf /var/www/html/apps/$app + cp -arT /usr/src/nextcloud/apps/$app /var/www/html/apps/$app + done + chown -R www-data /var/www/html fi diff --git a/Dockerfile-php7.template b/Dockerfile-php7.template index 6dd989a5..afc62eac 100644 --- a/Dockerfile-php7.template +++ b/Dockerfile-php7.template @@ -1,6 +1,7 @@ FROM php:7.1-%%VARIANT%% RUN apt-get update && apt-get install -y \ + rsync \ bzip2 \ libcurl4-openssl-dev \ libfreetype6-dev \ diff --git a/Dockerfile.template b/Dockerfile.template index 3d713793..e03e8f1c 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,6 +1,7 @@ FROM php:5.6-%%VARIANT%% RUN apt-get update && apt-get install -y \ + rsync \ bzip2 \ libcurl4-openssl-dev \ libfreetype6-dev \ diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 3dc4a327..01213c03 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -18,7 +18,18 @@ if version_greater "$installed_version" "$image_version"; then fi if version_greater "$image_version" "$installed_version"; then - tar cf - --one-file-system -C /usr/src/nextcloud . | tar xf - + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + + if [ ! -d /var/www/html/config ]; then + cp -arT /usr/src/nextcloud/config /var/www/html/config + fi + + mkdir -p /var/www/html/apps + for app in `find /usr/src/nextcloud/apps -maxdepth 1 -mindepth 1 -type d | cut -d / -f 6`; do + rm -rf /var/www/html/apps/$app + cp -arT /usr/src/nextcloud/apps/$app /var/www/html/apps/$app + done + chown -R www-data /var/www/html fi |