diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index a850ddb..57bcbb2 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -76,6 +76,7 @@ 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 VOLUME /opt/storage /opt/config /opt/log /opt/static EXPOSE 9787/tcp ENTRYPOINT /usr/local/bin/run diff --git a/nextcloud/background-worker.sh b/nextcloud/background-worker.sh new file mode 100755 index 0000000..5cffd97 --- /dev/null +++ b/nextcloud/background-worker.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e +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 +export USER=www-data HOME=/home/www-data + +exec su -s /var/www/nextcloud/occ background-jobs:worker