diff --git a/nextcloud/README.md b/nextcloud/README.md index 99631df..d84c3d2 100644 --- a/nextcloud/README.md +++ b/nextcloud/README.md @@ -41,12 +41,12 @@ To test without NPM, open http://HOST_IP:8084. Set `NEXTCLOUD_DOMAIN=HOST_IP` an ## Volume Notes /var/lib/mysql – host path /data/nextcloud/db (MariaDB data) - /data – host path /data/nextcloud/redis (Redis cache, safe to lose) + /data – host path /var/cache/nextcloud/redis (Redis cache, file locks and sessions; safe to lose, users are logged out) /var/www/html – host path /data/nextcloud/data (Nextcloud app, config and user files; shared by nextcloud and nextcloud-cron) /var/www/html/data/appdata_/preview – host path /var/cache/nextcloud/preview (generated thumbnails; only once NEXTCLOUD_PREVIEW_DIR is set) -Back up `/data/nextcloud/data` and `/data/nextcloud/db` together. Leave out `/var/cache`: previews are regenerated on demand. +Back up `/data/nextcloud/data` and `/data/nextcloud/db` together. Leave out `/var/cache`: previews are regenerated on demand, and Redis rebuilds its cache. ### Moving previews to VOL_CACHE diff --git a/nextcloud/compose.yaml b/nextcloud/compose.yaml index b285692..30b86ec 100644 --- a/nextcloud/compose.yaml +++ b/nextcloud/compose.yaml @@ -18,7 +18,7 @@ services: image: ${REDIS_IMAGE:-redis:alpine} restart: ${REDIS_RESTART:-unless-stopped} volumes: - - ${VOL_PATH:-/data}/nextcloud/redis:/data + - ${VOL_CACHE:-/var/cache}/nextcloud/redis:/data networks: - internal diff --git a/nextcloud/sample.env b/nextcloud/sample.env index 1290850..0887490 100644 --- a/nextcloud/sample.env +++ b/nextcloud/sample.env @@ -1,6 +1,6 @@ # Compose VOL_PATH=/data -# Regenerable data (previews) — exclude from backups +# Regenerable data (previews, redis) — exclude from backups VOL_CACHE=/var/cache NEXTCLOUD_IMAGE=nextcloud:35 NEXTCLOUD_RESTART=unless-stopped