feat(owncloud): upgrade to ownCloud 11 with MariaDB 10.11 and Redis 7

This commit is contained in:
tiennm99 committed 2026-10-11 09:20:28 +07:00
1 parent 87604a2bd7
commit 8b33bd9135
2 files changed
+31 -11

No files matched your search

+25 -8
View File
@@ -1,6 +1,6 @@
# owncloud # owncloud
[ownCloud](https://doc.owncloud.com/server/10.16/admin_manual/installation/docker/) [ownCloud](https://doc.owncloud.com/server/11.0/admin_manual/installation/installing_with_docker.html)
Server: file sync and share, with web, desktop and mobile clients. Server: file sync and share, with web, desktop and mobile clients.
Three containers: `owncloud`, `db` (MariaDB) for metadata, users and shares, and Three containers: `owncloud`, `db` (MariaDB) for metadata, users and shares, and
@@ -15,7 +15,11 @@ Three containers: `owncloud`, `db` (MariaDB) for metadata, users and shares, and
3. Log in with `OWNCLOUD_ADMIN_USERNAME` / `OWNCLOUD_ADMIN_PASSWORD`. 3. Log in with `OWNCLOUD_ADMIN_USERNAME` / `OWNCLOUD_ADMIN_PASSWORD`.
Health check: `/usr/bin/healthcheck`, the image's own script, also the compose Health check: `/usr/bin/healthcheck`, the image's own script, also the compose
healthcheck. healthcheck. It requests `/status.php` on port `8080`.
Every start runs `occ upgrade` when `config.php` on `owncloud-data` says
ownCloud is installed, and a fresh install otherwise. A new image version is
therefore migrated on the next deploy, against whatever database `db` holds.
## Environment ## Environment
@@ -29,6 +33,10 @@ healthcheck.
`OWNCLOUD_DOMAIN` also fills `OWNCLOUD_TRUSTED_DOMAINS`; ownCloud rejects `OWNCLOUD_DOMAIN` also fills `OWNCLOUD_TRUSTED_DOMAINS`; ownCloud rejects
requests for any host not on that list. requests for any host not on that list.
TLS ends at the proxy, so ownCloud sees plain HTTP. `OWNCLOUD_OVERWRITE_PROTOCOL`
makes the URLs it generates `https`, and `OWNCLOUD_PROTOCOL` does the same for
the URL `occ` and cron jobs use in links.
The admin variables are read only by the first-start install. Changing them The admin variables are read only by the first-start install. Changing them
later does not change the account; use the web UI or `occ user:resetpassword`. later does not change the account; use the web UI or `occ user:resetpassword`.
@@ -50,10 +58,19 @@ named one Docker creates an anonymous volume on every recreate.
## Images ## Images
`owncloud/server:10` tracks the 10.x line. `latest` points at the same `owncloud/server:11` tracks the 11.x line, so patch releases arrive on the next
release today, but ownCloud now also publishes 11.x, and a move to a new major deploy and a move to a new major stays a deliberate upgrade. ownCloud's own
should be a deliberate upgrade with a backup, not a side effect of a pull. compose pins a full version instead.
`mariadb:12` and `redis:6` track their major versions. A MariaDB data `mariadb:10.11` is the release ownCloud 11's compose uses and the top of the
directory cannot move back to an older major, so back up the database volume MariaDB range ownCloud supports (10.2 to 10.11); a newer major is outside it.
before changing it. `MARIADB_AUTO_UPGRADE=1`, also from ownCloud's compose, runs `mariadb-upgrade`
when the server version changes. A MariaDB data directory cannot move back to
an older major, so going down a version means a dump and restore into an empty
volume, not an image change. Back up `db-data` before changing the tag.
`redis:7` is the version ownCloud's compose uses.
ownCloud 11 runs on PHP 8. Apps installed into `/mnt/data/apps` from the
marketplace under 10.x were built for PHP 7, so they are removed or replaced
with PHP 8 versions before moving a 10.x install to 11.
+6 -3
View File
@@ -1,10 +1,12 @@
services: services:
owncloud: owncloud:
image: owncloud/server:10 image: owncloud/server:11
restart: unless-stopped restart: unless-stopped
environment: environment:
- OWNCLOUD_DOMAIN=${OWNCLOUD_DOMAIN:?required} - OWNCLOUD_DOMAIN=${OWNCLOUD_DOMAIN:?required}
- OWNCLOUD_TRUSTED_DOMAINS=${OWNCLOUD_DOMAIN:?required} - OWNCLOUD_TRUSTED_DOMAINS=${OWNCLOUD_DOMAIN:?required}
- OWNCLOUD_PROTOCOL=https
- OWNCLOUD_OVERWRITE_PROTOCOL=https
- OWNCLOUD_ADMIN_USERNAME=${OWNCLOUD_ADMIN_USERNAME:-admin} - OWNCLOUD_ADMIN_USERNAME=${OWNCLOUD_ADMIN_USERNAME:-admin}
- OWNCLOUD_ADMIN_PASSWORD=${OWNCLOUD_ADMIN_PASSWORD:?required} - OWNCLOUD_ADMIN_PASSWORD=${OWNCLOUD_ADMIN_PASSWORD:?required}
- OWNCLOUD_DB_TYPE=mysql - OWNCLOUD_DB_TYPE=mysql
@@ -30,7 +32,7 @@ services:
# MariaDB for file metadata, users and shares. # MariaDB for file metadata, users and shares.
db: db:
image: mariadb:12 image: mariadb:10.11
restart: unless-stopped restart: unless-stopped
command: command:
- --character-set-server=utf8mb4 - --character-set-server=utf8mb4
@@ -42,6 +44,7 @@ services:
- MYSQL_DATABASE=${DB_NAME:-owncloud} - MYSQL_DATABASE=${DB_NAME:-owncloud}
- MYSQL_USER=${DB_USER:-owncloud} - MYSQL_USER=${DB_USER:-owncloud}
- MYSQL_PASSWORD=${DB_PASSWORD:?required} - MYSQL_PASSWORD=${DB_PASSWORD:?required}
- MARIADB_AUTO_UPGRADE=1
volumes: volumes:
- db-data:/var/lib/mysql - db-data:/var/lib/mysql
healthcheck: healthcheck:
@@ -52,7 +55,7 @@ services:
# Redis for file locking and the distributed cache. # Redis for file locking and the distributed cache.
cache: cache:
image: redis:6 image: redis:7
restart: unless-stopped restart: unless-stopped
command: ["--databases", "1"] command: ["--databases", "1"]
volumes: volumes: