From 8b33bd9135971959af1bd24d92a0b5dd5fa21764 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Sun, 11 Oct 2026 09:20:28 +0700 Subject: [PATCH] feat(owncloud): upgrade to ownCloud 11 with MariaDB 10.11 and Redis 7 --- owncloud/README.md | 33 +++++++++++++++++++++++++-------- owncloud/compose.yml | 9 ++++++--- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/owncloud/README.md b/owncloud/README.md index 600aa31..7b6e6d0 100644 --- a/owncloud/README.md +++ b/owncloud/README.md @@ -1,6 +1,6 @@ # 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. 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`. 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 @@ -29,6 +33,10 @@ healthcheck. `OWNCLOUD_DOMAIN` also fills `OWNCLOUD_TRUSTED_DOMAINS`; ownCloud rejects 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 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 -`owncloud/server:10` tracks the 10.x line. `latest` points at the same -release today, but ownCloud now also publishes 11.x, and a move to a new major -should be a deliberate upgrade with a backup, not a side effect of a pull. +`owncloud/server:11` tracks the 11.x line, so patch releases arrive on the next +deploy and a move to a new major stays a deliberate upgrade. ownCloud's own +compose pins a full version instead. -`mariadb:12` and `redis:6` track their major versions. A MariaDB data -directory cannot move back to an older major, so back up the database volume -before changing it. +`mariadb:10.11` is the release ownCloud 11's compose uses and the top of the +MariaDB range ownCloud supports (10.2 to 10.11); a newer major is outside 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. diff --git a/owncloud/compose.yml b/owncloud/compose.yml index c6151fb..958cf4c 100644 --- a/owncloud/compose.yml +++ b/owncloud/compose.yml @@ -1,10 +1,12 @@ services: owncloud: - image: owncloud/server:10 + image: owncloud/server:11 restart: unless-stopped environment: - OWNCLOUD_DOMAIN=${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_PASSWORD=${OWNCLOUD_ADMIN_PASSWORD:?required} - OWNCLOUD_DB_TYPE=mysql @@ -30,7 +32,7 @@ services: # MariaDB for file metadata, users and shares. db: - image: mariadb:12 + image: mariadb:10.11 restart: unless-stopped command: - --character-set-server=utf8mb4 @@ -42,6 +44,7 @@ services: - MYSQL_DATABASE=${DB_NAME:-owncloud} - MYSQL_USER=${DB_USER:-owncloud} - MYSQL_PASSWORD=${DB_PASSWORD:?required} + - MARIADB_AUTO_UPGRADE=1 volumes: - db-data:/var/lib/mysql healthcheck: @@ -52,7 +55,7 @@ services: # Redis for file locking and the distributed cache. cache: - image: redis:6 + image: redis:7 restart: unless-stopped command: ["--databases", "1"] volumes: