From 2831651bd2e6ef7873dd9336e84e25905894ae4f Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 5 Oct 2026 14:52:03 +0700 Subject: [PATCH] fix(owncloud): give redis a named data volume, as upstream does --- owncloud/README.md | 6 ++++-- owncloud/compose.yml | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/owncloud/README.md b/owncloud/README.md index 8dbbe10..2873166 100644 --- a/owncloud/README.md +++ b/owncloud/README.md @@ -42,9 +42,11 @@ connection rather than changing the password. | --- | --- | --- | | `owncloud-data` | `/mnt/data` | User files, apps, `config.php` | | `owncloud-mysql-data` | `/var/lib/mysql` | The database | +| `owncloud-redis-data` | `/data` | Redis locks and cache | -Redis has no named volume. It holds only locks and cache, which ownCloud -rebuilds after a restart. +The Redis volume follows ownCloud's own compose. Its contents are rebuilt +after a restart, but the `redis` image declares `/data` a volume, so without a +named one Docker creates an anonymous volume on every recreate. ## Images diff --git a/owncloud/compose.yml b/owncloud/compose.yml index f4f7b3d..f802c7a 100644 --- a/owncloud/compose.yml +++ b/owncloud/compose.yml @@ -55,6 +55,8 @@ services: image: redis:6 restart: unless-stopped command: ["--databases", "1"] + volumes: + - owncloud-redis-data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s @@ -64,3 +66,4 @@ services: volumes: owncloud-data: owncloud-mysql-data: + owncloud-redis-data: