From fc106060b74c811526165aac1c2636e863d222de Mon Sep 17 00:00:00 2001 From: Florian Zirker Date: Fri, 16 Jun 2023 08:37:08 +0200 Subject: [PATCH] Nextcloud: run cronejob every minute --- nextcloud/Dockerfile | 2 ++ nextcloud/crontab | 3 --- nextcloud/docker-compose.yaml | 6 ------ 3 files changed, 2 insertions(+), 9 deletions(-) delete mode 100755 nextcloud/crontab diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index 600750a..7b9cb73 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -9,3 +9,5 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ocrmypdf tesseract-ocr-deu \ procps \ && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /var/spool/cron/crontabs; echo '* * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data diff --git a/nextcloud/crontab b/nextcloud/crontab deleted file mode 100755 index a8885e2..0000000 --- a/nextcloud/crontab +++ /dev/null @@ -1,3 +0,0 @@ -*/5 * * * * php -f /var/www/html/cron.php - - diff --git a/nextcloud/docker-compose.yaml b/nextcloud/docker-compose.yaml index 95c8f20..90aaf18 100644 --- a/nextcloud/docker-compose.yaml +++ b/nextcloud/docker-compose.yaml @@ -72,12 +72,6 @@ services: volumes: - ${VOLUMES_PATH}/nextcloud/html:/var/www/html - ${VOLUMES_PATH}/nextcloud/data:/var/www/html/data -# If I mount my crontab into the container crond is not working any more :( -# docker log should print 11110001 lines -# https://github.com/nextcloud/docker/issues/1775 -# https://github.com/nextcloud/docker/issues/1695 -# build own cron image? -# - $PWD/crontab:/var/spool/cron/crontabs/www-data entrypoint: /cron.sh depends_on: - db