From fc384e6a7e4a7df0fd4a5275f4634ef220d0855a Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Mon, 17 Apr 2017 23:02:25 +0200 Subject: [PATCH] split app folder --- 10.0/apache/Dockerfile | 1 + 10.0/apache/apps.config.php | 15 +++++++++++++++ 10.0/apache/docker-entrypoint.sh | 8 ++------ 10.0/fpm/Dockerfile | 1 + 10.0/fpm/apps.config.php | 15 +++++++++++++++ 10.0/fpm/docker-entrypoint.sh | 8 ++------ 11.0/apache/Dockerfile | 1 + 11.0/apache/apps.config.php | 15 +++++++++++++++ 11.0/apache/docker-entrypoint.sh | 8 ++------ 11.0/fpm/Dockerfile | 1 + 11.0/fpm/apps.config.php | 15 +++++++++++++++ 11.0/fpm/docker-entrypoint.sh | 8 ++------ 9.0/apache/Dockerfile | 1 + 9.0/apache/apps.config.php | 15 +++++++++++++++ 9.0/apache/docker-entrypoint.sh | 8 ++------ 9.0/fpm/Dockerfile | 1 + 9.0/fpm/apps.config.php | 15 +++++++++++++++ 9.0/fpm/docker-entrypoint.sh | 8 ++------ Dockerfile-php7.template | 1 + Dockerfile.template | 1 + apps.config.php | 15 +++++++++++++++ docker-entrypoint.sh | 8 ++------ update.sh | 3 +++ 23 files changed, 130 insertions(+), 42 deletions(-) create mode 100644 10.0/apache/apps.config.php create mode 100644 10.0/fpm/apps.config.php create mode 100644 11.0/apache/apps.config.php create mode 100644 11.0/fpm/apps.config.php create mode 100644 9.0/apache/apps.config.php create mode 100644 9.0/fpm/apps.config.php create mode 100644 apps.config.php diff --git a/10.0/apache/Dockerfile b/10.0/apache/Dockerfile index 54e4801..1a51103 100644 --- a/10.0/apache/Dockerfile +++ b/10.0/apache/Dockerfile @@ -56,6 +56,7 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \ && rm nextcloud.tar.bz2 COPY docker-entrypoint.sh /entrypoint.sh +COPY apps.config.php /usr/src/nextcloud/config/apps.config.php ENTRYPOINT ["/entrypoint.sh"] CMD ["apache2-foreground"] diff --git a/10.0/apache/apps.config.php b/10.0/apache/apps.config.php new file mode 100644 index 0000000..a4bed83 --- /dev/null +++ b/10.0/apache/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + "path" => OC::$SERVERROOT."/apps", + "url" => "/apps", + "writable" => false, + ), + 1 => array ( + "path" => OC::$SERVERROOT."/custom_apps", + "url" => "/custom_apps", + "writable" => true, + ), + ), +); diff --git a/10.0/apache/docker-entrypoint.sh b/10.0/apache/docker-entrypoint.sh index d747ead..1d40304 100755 --- a/10.0/apache/docker-entrypoint.sh +++ b/10.0/apache/docker-entrypoint.sh @@ -22,17 +22,13 @@ if version_greater "$image_version" "$installed_version"; then su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before fi - rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_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 + mkdir -p /var/www/html/custom_apps chown -R www-data /var/www/html diff --git a/10.0/fpm/Dockerfile b/10.0/fpm/Dockerfile index 5f4c7e2..6e01430 100644 --- a/10.0/fpm/Dockerfile +++ b/10.0/fpm/Dockerfile @@ -54,6 +54,7 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \ && rm nextcloud.tar.bz2 COPY docker-entrypoint.sh /entrypoint.sh +COPY apps.config.php /usr/src/nextcloud/config/apps.config.php ENTRYPOINT ["/entrypoint.sh"] CMD ["php-fpm"] diff --git a/10.0/fpm/apps.config.php b/10.0/fpm/apps.config.php new file mode 100644 index 0000000..a4bed83 --- /dev/null +++ b/10.0/fpm/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + "path" => OC::$SERVERROOT."/apps", + "url" => "/apps", + "writable" => false, + ), + 1 => array ( + "path" => OC::$SERVERROOT."/custom_apps", + "url" => "/custom_apps", + "writable" => true, + ), + ), +); diff --git a/10.0/fpm/docker-entrypoint.sh b/10.0/fpm/docker-entrypoint.sh index d747ead..1d40304 100755 --- a/10.0/fpm/docker-entrypoint.sh +++ b/10.0/fpm/docker-entrypoint.sh @@ -22,17 +22,13 @@ if version_greater "$image_version" "$installed_version"; then su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before fi - rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_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 + mkdir -p /var/www/html/custom_apps chown -R www-data /var/www/html diff --git a/11.0/apache/Dockerfile b/11.0/apache/Dockerfile index 5217f2e..8fe705f 100644 --- a/11.0/apache/Dockerfile +++ b/11.0/apache/Dockerfile @@ -56,6 +56,7 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \ && rm nextcloud.tar.bz2 COPY docker-entrypoint.sh /entrypoint.sh +COPY apps.config.php /usr/src/nextcloud/config/apps.config.php ENTRYPOINT ["/entrypoint.sh"] CMD ["apache2-foreground"] diff --git a/11.0/apache/apps.config.php b/11.0/apache/apps.config.php new file mode 100644 index 0000000..a4bed83 --- /dev/null +++ b/11.0/apache/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + "path" => OC::$SERVERROOT."/apps", + "url" => "/apps", + "writable" => false, + ), + 1 => array ( + "path" => OC::$SERVERROOT."/custom_apps", + "url" => "/custom_apps", + "writable" => true, + ), + ), +); diff --git a/11.0/apache/docker-entrypoint.sh b/11.0/apache/docker-entrypoint.sh index d747ead..1d40304 100755 --- a/11.0/apache/docker-entrypoint.sh +++ b/11.0/apache/docker-entrypoint.sh @@ -22,17 +22,13 @@ if version_greater "$image_version" "$installed_version"; then su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before fi - rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_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 + mkdir -p /var/www/html/custom_apps chown -R www-data /var/www/html diff --git a/11.0/fpm/Dockerfile b/11.0/fpm/Dockerfile index e703bcd..c77129a 100644 --- a/11.0/fpm/Dockerfile +++ b/11.0/fpm/Dockerfile @@ -54,6 +54,7 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \ && rm nextcloud.tar.bz2 COPY docker-entrypoint.sh /entrypoint.sh +COPY apps.config.php /usr/src/nextcloud/config/apps.config.php ENTRYPOINT ["/entrypoint.sh"] CMD ["php-fpm"] diff --git a/11.0/fpm/apps.config.php b/11.0/fpm/apps.config.php new file mode 100644 index 0000000..a4bed83 --- /dev/null +++ b/11.0/fpm/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + "path" => OC::$SERVERROOT."/apps", + "url" => "/apps", + "writable" => false, + ), + 1 => array ( + "path" => OC::$SERVERROOT."/custom_apps", + "url" => "/custom_apps", + "writable" => true, + ), + ), +); diff --git a/11.0/fpm/docker-entrypoint.sh b/11.0/fpm/docker-entrypoint.sh index d747ead..1d40304 100755 --- a/11.0/fpm/docker-entrypoint.sh +++ b/11.0/fpm/docker-entrypoint.sh @@ -22,17 +22,13 @@ if version_greater "$image_version" "$installed_version"; then su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before fi - rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_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 + mkdir -p /var/www/html/custom_apps chown -R www-data /var/www/html diff --git a/9.0/apache/Dockerfile b/9.0/apache/Dockerfile index 432d60b..d9bb364 100644 --- a/9.0/apache/Dockerfile +++ b/9.0/apache/Dockerfile @@ -56,6 +56,7 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \ && rm nextcloud.tar.bz2 COPY docker-entrypoint.sh /entrypoint.sh +COPY apps.config.php /usr/src/nextcloud/config/apps.config.php ENTRYPOINT ["/entrypoint.sh"] CMD ["apache2-foreground"] diff --git a/9.0/apache/apps.config.php b/9.0/apache/apps.config.php new file mode 100644 index 0000000..a4bed83 --- /dev/null +++ b/9.0/apache/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + "path" => OC::$SERVERROOT."/apps", + "url" => "/apps", + "writable" => false, + ), + 1 => array ( + "path" => OC::$SERVERROOT."/custom_apps", + "url" => "/custom_apps", + "writable" => true, + ), + ), +); diff --git a/9.0/apache/docker-entrypoint.sh b/9.0/apache/docker-entrypoint.sh index d747ead..1d40304 100755 --- a/9.0/apache/docker-entrypoint.sh +++ b/9.0/apache/docker-entrypoint.sh @@ -22,17 +22,13 @@ if version_greater "$image_version" "$installed_version"; then su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before fi - rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_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 + mkdir -p /var/www/html/custom_apps chown -R www-data /var/www/html diff --git a/9.0/fpm/Dockerfile b/9.0/fpm/Dockerfile index 2bab08c..2b60039 100644 --- a/9.0/fpm/Dockerfile +++ b/9.0/fpm/Dockerfile @@ -54,6 +54,7 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \ && rm nextcloud.tar.bz2 COPY docker-entrypoint.sh /entrypoint.sh +COPY apps.config.php /usr/src/nextcloud/config/apps.config.php ENTRYPOINT ["/entrypoint.sh"] CMD ["php-fpm"] diff --git a/9.0/fpm/apps.config.php b/9.0/fpm/apps.config.php new file mode 100644 index 0000000..a4bed83 --- /dev/null +++ b/9.0/fpm/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + "path" => OC::$SERVERROOT."/apps", + "url" => "/apps", + "writable" => false, + ), + 1 => array ( + "path" => OC::$SERVERROOT."/custom_apps", + "url" => "/custom_apps", + "writable" => true, + ), + ), +); diff --git a/9.0/fpm/docker-entrypoint.sh b/9.0/fpm/docker-entrypoint.sh index d747ead..1d40304 100755 --- a/9.0/fpm/docker-entrypoint.sh +++ b/9.0/fpm/docker-entrypoint.sh @@ -22,17 +22,13 @@ if version_greater "$image_version" "$installed_version"; then su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before fi - rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_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 + mkdir -p /var/www/html/custom_apps chown -R www-data /var/www/html diff --git a/Dockerfile-php7.template b/Dockerfile-php7.template index afc62ea..fe282ad 100644 --- a/Dockerfile-php7.template +++ b/Dockerfile-php7.template @@ -56,6 +56,7 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \ && rm nextcloud.tar.bz2 COPY docker-entrypoint.sh /entrypoint.sh +COPY apps.config.php /usr/src/nextcloud/config/apps.config.php ENTRYPOINT ["/entrypoint.sh"] CMD ["%%CMD%%"] diff --git a/Dockerfile.template b/Dockerfile.template index e03e8f1..abfa9bc 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -56,6 +56,7 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \ && rm nextcloud.tar.bz2 COPY docker-entrypoint.sh /entrypoint.sh +COPY apps.config.php /usr/src/nextcloud/config/apps.config.php ENTRYPOINT ["/entrypoint.sh"] CMD ["%%CMD%%"] diff --git a/apps.config.php b/apps.config.php new file mode 100644 index 0000000..a4bed83 --- /dev/null +++ b/apps.config.php @@ -0,0 +1,15 @@ + array ( + 0 => array ( + "path" => OC::$SERVERROOT."/apps", + "url" => "/apps", + "writable" => false, + ), + 1 => array ( + "path" => OC::$SERVERROOT."/custom_apps", + "url" => "/custom_apps", + "writable" => true, + ), + ), +); diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index d747ead..1d40304 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -22,17 +22,13 @@ if version_greater "$image_version" "$installed_version"; then su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before fi - rsync -a --delete --exclude /config/ --exclude /data/ --exclude /apps/ /usr/src/nextcloud/ /var/www/html/ + rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_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 + mkdir -p /var/www/html/custom_apps chown -R www-data /var/www/html diff --git a/update.sh b/update.sh index 4c41d75..352820b 100755 --- a/update.sh +++ b/update.sh @@ -46,6 +46,9 @@ for latest in "${latests[@]}"; do # Copy the docker-entrypoint. cp docker-entrypoint.sh "$version/$variant/docker-entrypoint.sh" + # Copy apps.config.php + cp apps.config.php "$version/$variant/apps.config.php" + travisEnv='\n - VERSION='"$version"' VARIANT='"$variant$travisEnv" done done