diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index 73a6c53..030920f 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -75,9 +75,7 @@ RUN ln -sf /opt/config/nginx.conf /etc/nginx/sites-enabled/default; \ RUN chown www-data /opt/config -ADD start.sh /usr/local/bin/run -ADD cron.sh /usr/local/bin/cron.sh -ADD background-worker.sh /usr/local/bin/background-worker.sh +ADD start.sh longcron.sh quickcron.sh background-worker.sh /usr/local/bin/run/ VOLUME /opt/storage /opt/config /opt/log /opt/static EXPOSE 9787/tcp ENTRYPOINT /usr/local/bin/run diff --git a/nextcloud/cron.sh b/nextcloud/longcron.sh similarity index 88% rename from nextcloud/cron.sh rename to nextcloud/longcron.sh index 7c83ef3..b00640c 100755 --- a/nextcloud/cron.sh +++ b/nextcloud/longcron.sh @@ -11,9 +11,6 @@ export USER=www-data HOME=/home/www-data echo "Syncing system address books with dav" su -s /var/www/nextcloud/occ www-data -- dav:sync-system-addressbook -echo "Running cron.php" -su -s /usr/bin/php www-data /var/www/nextcloud/cron.php - echo "Add missing db indices" su -s /var/www/nextcloud/occ www-data -- db:add-missing-indices diff --git a/nextcloud/quickcron.sh b/nextcloud/quickcron.sh new file mode 100755 index 0000000..4199b93 --- /dev/null +++ b/nextcloud/quickcron.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +set -e + +echo "Preparing environment" +cp /opt/config/config.php /var/www/nextcloud/config/config.php +chown -R www-data /var/www/nextcloud/config /var/www/nextcloud/apps /opt/log +chmod +x /var/www/nextcloud/occ +mkdir -p /run/php +export USER=www-data HOME=/home/www-data + +echo "Running cron.php" +su -s /usr/bin/php www-data /var/www/nextcloud/cron.php +