I am running Nextcloud via the Nextcloud docker image. This is how my docker compose file looks like
// other settings
nextcloud:
image: nextcloud:17-apache
container_name: nextcloud
depends_on:
- nextcloud_db
- nextcloud_redis
volumes:
- ${DATADIR}/nextcloud/custom_apps:/var/www/html/custom_apps
- ${DATADIR}/nextcloud/config:/var/www/html/config
- ${DATADIR}/nextcloud/data:/var/www/html/data
- ${DATADIR}/nextcloud/themes:/var/www/html/themes
- ${DATADIR}/nextcloud/www:/var/www/html
restart: unless-stopped
networks:
- nextcloud_network
- traefik_proxy
labels:
// ... Traefik
cron:
image: nextcloud:17-apache
restart: unless-stopped
entrypoint: /cron.sh
volumes:
- ${DATADIR}/nextcloud/www:/var/www/html
- ${DATADIR}/nextcloud/data:/var/www/html/data
depends_on:
- nextcloud_db
- nextcloud_redis
networks:
- nextcloud_network
// db and other stuff
Mostly everything seems to work fine but cron is not. It never runs and I find these errors in the logs:
Exception: Not installed
/var/www/html/lib/base.php - line 646:
OC::checkInstalled()
/var/www/html/lib/base.php - line 1078:
OC::init()
/var/www/html/cron.php - line 41:
require_once("/var/www/html/lib/base.php")
I jumped into the container and the base.php file seems to be there
www-data@735905f1a3f0:~/html$ ls -lah /var/www/html/lib/
total 111K
drwxr-xr-x 6 www-data root 9 May 30 11:35 .
drwxr-xr-x 15 www-data root 29 May 30 11:35 ..
-rw-r--r-- 1 www-data root 5.4K May 30 11:35 autoloader.php
-rw-r--r-- 1 www-data root 36K May 30 11:35 base.php
drwxr-xr-x 3 www-data root 4 May 30 11:35 composer
drwxr-xr-x 2 www-data root 190 May 30 11:35 l10n
drwxr-xr-x 58 www-data root 100 May 30 11:35 private
drwxr-xr-x 49 www-data root 105 May 30 11:35 public
-rw-r--r-- 1 www-data root 615 May 30 11:35 versioncheck.php
My config.php also contains 'installed' => true,
If I manually run cron.php from within the container nothing seems to happen, no output, the task just keeps running until I hit ctrl+C. Why is it not working? What am I missing here?