refactor: name supporting services and volumes by role

Rename database services to db and cache services to cache, with their
volumes as db-data and cache-data, in litellm, owncloud and goclaw. Rename
the couchbase and open-webui volumes to <service>-data. Data on miti-sg was
copied into the new volumes beforehand; the old volumes are kept.
This commit is contained in:
tiennm99 committed 2026-10-07 19:26:27 +07:00
1 parent 29f52dfcb3
commit 3ea1b39e44
11 files changed
+42 -64

No files matched your search

+4 -4
View File
@@ -3,8 +3,8 @@
[ownCloud](https://doc.owncloud.com/server/10.16/admin_manual/installation/docker/)
Server: file sync and share, with web, desktop and mobile clients.
Three containers: `owncloud`, `mariadb` for metadata, users and shares, and
`redis` for file locking and the distributed cache.
Three containers: `owncloud`, `db` (MariaDB) for metadata, users and shares, and
`cache` (Redis) for file locking and the distributed cache.
## Setup
@@ -41,8 +41,8 @@ connection rather than changing the password.
| Volume | Mount | Holds |
| --- | --- | --- |
| `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 |
| `db-data` | `/var/lib/mysql` | The database |
| `cache-data` | `/data` | Redis locks and cache |
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
+10 -10
View File
@@ -8,19 +8,19 @@ services:
- OWNCLOUD_ADMIN_USERNAME=${OWNCLOUD_ADMIN_USERNAME:-admin}
- OWNCLOUD_ADMIN_PASSWORD=${OWNCLOUD_ADMIN_PASSWORD:?required}
- OWNCLOUD_DB_TYPE=mysql
- OWNCLOUD_DB_HOST=mariadb
- OWNCLOUD_DB_HOST=db
- OWNCLOUD_DB_NAME=${DB_NAME:-owncloud}
- OWNCLOUD_DB_USERNAME=${DB_USER:-owncloud}
- OWNCLOUD_DB_PASSWORD=${DB_PASSWORD:?required}
- OWNCLOUD_MYSQL_UTF8MB4=true
- OWNCLOUD_REDIS_ENABLED=true
- OWNCLOUD_REDIS_HOST=redis
- OWNCLOUD_REDIS_HOST=cache
volumes:
- owncloud-data:/mnt/data
depends_on:
mariadb:
db:
condition: service_healthy
redis:
cache:
condition: service_healthy
healthcheck:
test: ["CMD", "/usr/bin/healthcheck"]
@@ -29,7 +29,7 @@ services:
retries: 5
# MariaDB for file metadata, users and shares.
mariadb:
db:
image: mariadb:12
restart: unless-stopped
command:
@@ -43,7 +43,7 @@ services:
- MYSQL_USER=${DB_USER:-owncloud}
- MYSQL_PASSWORD=${DB_PASSWORD:?required}
volumes:
- owncloud-mysql-data:/var/lib/mysql
- db-data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
@@ -51,12 +51,12 @@ services:
retries: 10
# Redis for file locking and the distributed cache.
redis:
cache:
image: redis:6
restart: unless-stopped
command: ["--databases", "1"]
volumes:
- owncloud-redis-data:/data
- cache-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
@@ -65,5 +65,5 @@ services:
volumes:
owncloud-data:
owncloud-mysql-data:
owncloud-redis-data:
db-data:
cache-data: