From 206290d88b9fa3e7c9716a8b6b8b16afd882505e Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Sat, 21 Nov 2026 01:45:44 +0100 Subject: [PATCH] feat: Move gitea and nextcloud data volumes to dedicated profiles - volume-gitea-data / volume-nextcloud-data: data volume mounted in the application instance (daily snapshots are configured on the volume) - volume-gitea-data-ro / volume-nextcloud-data-ro: same volumes mounted read-only under /backup for the backup instance (restic + backrest), which must be unprivileged to share the volumes idmap - app-gitea / app-nextcloud: only install the application, the volume now comes from the volume-* profile Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018inUJksoKAfKRWoSo1tvv6 --- profiles/applications/app-gitea.profile.yaml | 6 ------ profiles/applications/app-nextcloud.profile.yaml | 6 ------ profiles/volumes/volume-gitea-data-ro.profile.yaml | 9 +++++++++ profiles/volumes/volume-gitea-data.profile.yaml | 8 ++++++++ profiles/volumes/volume-nextcloud-data-ro.profile.yaml | 9 +++++++++ profiles/volumes/volume-nextcloud-data.profile.yaml | 8 ++++++++ 6 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 profiles/volumes/volume-gitea-data-ro.profile.yaml create mode 100644 profiles/volumes/volume-gitea-data.profile.yaml create mode 100644 profiles/volumes/volume-nextcloud-data-ro.profile.yaml create mode 100644 profiles/volumes/volume-nextcloud-data.profile.yaml diff --git a/profiles/applications/app-gitea.profile.yaml b/profiles/applications/app-gitea.profile.yaml index 707d126..f15f28d 100644 --- a/profiles/applications/app-gitea.profile.yaml +++ b/profiles/applications/app-gitea.profile.yaml @@ -23,9 +23,3 @@ config: runcmd: # Install gitea - [ snap, install, gitea ] -devices: - data: - path: /var/snap/gitea/common - pool: zfs - source: gitea-data - type: disk diff --git a/profiles/applications/app-nextcloud.profile.yaml b/profiles/applications/app-nextcloud.profile.yaml index fcf97a5..294fa79 100644 --- a/profiles/applications/app-nextcloud.profile.yaml +++ b/profiles/applications/app-nextcloud.profile.yaml @@ -24,9 +24,3 @@ config: runcmd: # Install Nextcloud - [ snap, install, nextcloud ] -devices: - nextcloud-data: - path: /var/snap/nextcloud - pool: zfs - source: nextcloud-data - type: disk diff --git a/profiles/volumes/volume-gitea-data-ro.profile.yaml b/profiles/volumes/volume-gitea-data-ro.profile.yaml new file mode 100644 index 0000000..f1a3431 --- /dev/null +++ b/profiles/volumes/volume-gitea-data-ro.profile.yaml @@ -0,0 +1,9 @@ +name: volume-gitea-data-ro +description: Volume des données Gitea en lecture seule (instance de backup) +devices: + gitea-data: + path: /backup/gitea-data + pool: zfs + source: gitea-data + readonly: "true" + type: disk diff --git a/profiles/volumes/volume-gitea-data.profile.yaml b/profiles/volumes/volume-gitea-data.profile.yaml new file mode 100644 index 0000000..90f9a6e --- /dev/null +++ b/profiles/volumes/volume-gitea-data.profile.yaml @@ -0,0 +1,8 @@ +name: volume-gitea-data +description: Volume des données Gitea (snapshots quotidiens portés par le volume) +devices: + gitea-data: + path: /var/snap/gitea/common + pool: zfs + source: gitea-data + type: disk diff --git a/profiles/volumes/volume-nextcloud-data-ro.profile.yaml b/profiles/volumes/volume-nextcloud-data-ro.profile.yaml new file mode 100644 index 0000000..4641369 --- /dev/null +++ b/profiles/volumes/volume-nextcloud-data-ro.profile.yaml @@ -0,0 +1,9 @@ +name: volume-nextcloud-data-ro +description: Volume des données Nextcloud en lecture seule (instance de backup) +devices: + nextcloud-data: + path: /backup/nextcloud-data + pool: zfs + source: nextcloud-data + readonly: "true" + type: disk diff --git a/profiles/volumes/volume-nextcloud-data.profile.yaml b/profiles/volumes/volume-nextcloud-data.profile.yaml new file mode 100644 index 0000000..5668861 --- /dev/null +++ b/profiles/volumes/volume-nextcloud-data.profile.yaml @@ -0,0 +1,8 @@ +name: volume-nextcloud-data +description: Volume des données Nextcloud (snapshots quotidiens portés par le volume) +devices: + nextcloud-data: + path: /var/snap/nextcloud + pool: zfs + source: nextcloud-data + type: disk