From 1ad56435e545ce3ca859d7bda4621b13ccd8664c Mon Sep 17 00:00:00 2001 From: Claudio on hubris Date: Tue, 12 May 2026 19:25:14 +0200 Subject: [PATCH] seafile: enable Metadata management + Views (Pro) ENABLE_METADATA_MANAGEMENT=True + METADATA_SERVER_URL=http://seafile-md-server:8084 in seahub_settings.py. Library owners can now toggle metadata per library and create table/gallery/kanban Views over their files. --- containers/125-seafile.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/containers/125-seafile.md b/containers/125-seafile.md index de3996f..5e68a14 100644 --- a/containers/125-seafile.md +++ b/containers/125-seafile.md @@ -42,6 +42,25 @@ Compose layout: - `/mnt/library/seafile/data/` — bind-mounted to `/shared` in the seafile container. Holds config (`seafile/conf/`), logs (`seafile/logs/`), and the heavy block/fs/commit trees (`seafile/seafile-data/storage/`). Group-owned `:media` 2775. - `/opt/seafile/mysql/` — mariadb data (small, stays on rootfs). +## Metadata / Views + +Pro's per-library extended metadata (file tags, custom columns, table/gallery/kanban **Views**) is wired up: + +- `seahub_settings.py` between `# BEGIN-HUBRIS-METADATA` / `# END-HUBRIS-METADATA`: + ```python + ENABLE_METADATA_MANAGEMENT = True + METADATA_SERVER_URL = 'http://seafile-md-server:8084' + ``` +- The `seafile-md-server` container (see Stack table above) does the indexing; Seahub calls it via the docker-bridge DNS name `seafile-md-server`. + +**Per-library activation:** owner of a library opens it in the web UI → top-right menu → **Metadata management** → toggle on. The first PUT to `/api/v2.1/repos//metadata/` causes the md-server to index the library (see `seaf-md-server.log`: "start initializing the metadata of the repo …"). Once enabled, the library sidebar shows "Views" where the user can create table / gallery / kanban views. + +Pure-API enable for testing: +``` +curl -X PUT -H "Authorization: Token " https://files.hubris.network/api/v2.1/repos//metadata/ +# GET the same path returns: {"enabled":true, "tags_enabled":true, "show_view":true, ...} +``` + ## Auth Native OAuth2/OIDC against [authentik (124)](124-authentik.md). Configuration in `/mnt/library/seafile/data/seafile/conf/seahub_settings.py` between the `# BEGIN-HUBRIS-OAUTH` / `# END-HUBRIS-OAUTH` markers. @@ -142,6 +161,9 @@ For now: stand up Seafile, kick the tires, decide later whether to: ## Changelog +### 2026-05-12 — enable Metadata management + Views +Added `ENABLE_METADATA_MANAGEMENT = True` and `METADATA_SERVER_URL = 'http://seafile-md-server:8084'` to `seahub_settings.py` (between BEGIN-HUBRIS-METADATA / END-HUBRIS-METADATA markers), restarted the `seafile` container. Library owners can now enable metadata per-library and create table/gallery/kanban Views. Verified end-to-end by enabling metadata on a throwaway admin-owned library — `GET /api/v2.1/repos//metadata/` returns `{"enabled":true, "show_view":true, ...}` and `seaf-md-server.log` shows the indexer ran. + ### 2026-05-12 — add metadata + thumbnail servers Two more Pro services online: `seafile-md-server` (extended metadata, internal-only on :8084 over the docker bridge, no host port — enabled per-library from the Seahub UI) and `thumbnail-server` (offload thumbnail generation from Seahub, host-bound to `192.168.8.185:8081`). Caddy now splits `/thumbnail/*` → :8081 and everything else → :80; both blocks keep the resumable-upload header strip + 1 h transport timeouts. `INNER_SEAHUB_SERVICE_URL=http://seafile` in `.env` so the thumbnail server can call the Seahub container by DNS name for per-request permission checks (verified end-to-end: admin token → 403 for dtoro's repo via `POST /api/v2.1/internal/repos/.../check-thumbnail/user-token/`, i.e. routing works and perms are enforced).