Dear all
I am running a Nextcloud under Docker. The containers were created by the following docker-compose:
docker-compose:
version: '3.2'
services:
db:
image: postgres
restart: always
volumes:
- /mnt/docker/nextcloud/postgresql:/var/lib/postgresql/data
environment:
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
secrets:
- postgres_db
- postgres_password
- postgres_user
app:
image: nextcloud
restart: always
ports:
- 8281:80
volumes:
- /mnt/docker/nextcloud/nextcloud:/var/www/html
- /mnt/docker/nextcloud/apps:/var/www/html/custom_apps
- /mnt/docker/nextcloud/config:/var/www/html/config
- /mnt/docker/nextcloud/data:/var/www/html/data
environment:
- POSTGRES_HOST=db
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
- NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/nextcloud_admin_user
- REDIS_HOST=redis
depends_on:
- db
secrets:
- nextcloud_admin_password
- nextcloud_admin_user
- postgres_db
- postgres_password
- postgres_user
redis:
image: redis:alpine
restart: always
volumes:
- /mnt/docker/nextcloud/redisdata:/data
secrets:
nextcloud_admin_password:
file: /mnt/docker/nextcloud/secret_nextcloud_admin_password.txt
nextcloud_admin_user:
file: /mnt/docker/nextcloud/secret_nextcloud_admin_user.txt
postgres_db:
file: /mnt/docker/nextcloud/secret_postgres_db.txt
postgres_password:
file: /mnt/docker/nextcloud/secret_postgres_password.txt
postgres_user:
file: /mnt/docker/nextcloud/secret_postgres_user.txt
Everything works so far. However, the message irritates me:
" * This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them: bz2. For more details see the documentation ."
I use a ready-made Docker image including PHP which was created directly by Nextcloud (Docker). Why is the bz2 module not included there?
I also get the message “Last job execution ran XX hours ago”. I have created an entry in the cron (/etc/crontab) on my Docker host, which looks like this:
*/5 * * * * root docker exec --user www-data -it nextcloud-app-1 php /var/www/html/cron.php > /dev/null 2>&1
If the command is executed manually, it works, but not via cron. Cron does not display any errors:
Does anyone know the problem? Or is there a better solution for running cronjobs? I also tried another container, but unfortunately that didn’t work either.
cron:
image: nextcloud
restart: always
volumes:
- /mnt/docker/nextcloud/nextcloud:/var/www/html
- /mnt/docker/nextcloud/apps:/var/www/html/custom_apps
- /mnt/docker/nextcloud/config:/var/www/html/config
- /mnt/docker/nextcloud/data:/var/www/html/data
entrypoint: /cron.sh
depends_on:
- app
Thanks for your help and best regards