im struggling to get nextcloud set up in a resilient manner that dosent break when the image is updated or the docker container restarted at an inconvenient time. ive set up nextcloud about 4 times now, twice i had issues with the docker container getting updated at a bad time and nextcloud just didnt want to run again. after that i seperated it from my services stack and made a stack just for nextcloud but ive been unable to update the docker image manually or automatically with watchtowerrr. no matter what i do Nextcloud feels unstable. the configs are mounted externally, im not using a local db, so if nextcloud does go down, it shouldnt sh*t itself. it should pick back up from the mounted configs. i dont know whats breaking nextcloud, and i really need help with it.
here is my current nextcloud compose config
version: "3.9"
services:
nextcloud:
container_name: nextcloud
image: nextcloud
volumes:
- ${APP_VOLUME}/config/nextcloud:/var/www/html/config
- ${APP_VOLUME}/data/nextcloud:/var/www/html
restart: unless-stopped
nextcloud_mariadb:
container_name: nextcloud_mariadb
image: mariadb:latest
environment:
- MARIADB_ROOT_PASSWORD=${DB_PASS}
nextcloud_tunnel:
container_name: nextcloud_tunnel
image: cloudflare/cloudflared:latest
command: tunnel --no-autoupdate run --token ${CLOUDFLARED_TOKEN}
as you can see, teh config mounts the config to an external volume. there should be no issue with data or configs or anything, but im still facing issues with nextcloud whenever the container gets updated or goes down at an inconvenient time.