From fab4aee37a21b284a2cf1db904e9545117ee239c Mon Sep 17 00:00:00 2001 From: MacRimi Date: Mon, 26 Oct 2026 07:28:40 +0100 Subject: [PATCH] Keep the configuration of Glance, Homer and Prometheus across updates Glance and Homer write their starter configuration only when it is missing, so an update does not replace the one the user edited. Prometheus keeps /etc/prometheus in a volume of its own, which starts with the configuration of the image and can be a host directory. --- oci/catalog/apps/glance.json | 3 ++- oci/catalog/apps/homer.json | 3 ++- oci/catalog/apps/prometheus.json | 35 ++++++++++++++++++++++++++++- oci/catalog/curated/glance.json | 3 ++- oci/catalog/curated/homer.json | 3 ++- oci/catalog/curated/prometheus.json | 35 ++++++++++++++++++++++++++++- 6 files changed, 76 insertions(+), 6 deletions(-) diff --git a/oci/catalog/apps/glance.json b/oci/catalog/apps/glance.json index 2cea577d..09a241f9 100644 --- a/oci/catalog/apps/glance.json +++ b/oci/catalog/apps/glance.json @@ -374,7 +374,8 @@ "container_path": "/app/config/glance.yml", "mode": "0644", "owner": "mapped-root", - "content": "pages:\n - name: Home\n # Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look\n # hide-desktop-navigation: true\n columns:\n - size: small\n widgets:\n - type: calendar\n first-day-of-week: monday\n\n - type: rss\n limit: 10\n collapse-after: 3\n cache: 12h\n feeds:\n - url: https://selfh.st/rss/\n title: selfh.st\n limit: 4\n - url: https://ciechanow.ski/atom.xml\n - url: https://www.joshwcomeau.com/rss.xml\n title: Josh Comeau\n - url: https://samwho.dev/rss.xml\n - url: https://ishadeed.com/feed.xml\n title: Ahmad Shadeed\n\n - type: twitch-channels\n channels:\n - theprimeagen\n - j_blow\n - giantwaffle\n - cohhcarnage\n - christitustech\n - EJ_SA\n\n - size: full\n widgets:\n - type: group\n widgets:\n - type: hacker-news\n - type: lobsters\n\n - type: videos\n channels:\n - UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips\n - UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling\n - UCsBjURrPoezykLs9EqgamOA # Fireship\n - UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee\n - UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium\n\n - type: group\n widgets:\n - type: reddit\n subreddit: technology\n show-thumbnails: true\n - type: reddit\n subreddit: selfhosted\n show-thumbnails: true\n\n - size: small\n widgets:\n - type: weather\n location: London, United Kingdom\n units: metric # alternatively \"imperial\"\n hour-format: 12h # alternatively \"24h\"\n # Optionally hide the location from being displayed in the widget\n # hide-location: true\n\n - type: markets\n markets:\n - symbol: SPY\n name: S&P 500\n - symbol: BTC-USD\n name: Bitcoin\n - symbol: NVDA\n name: NVIDIA\n - symbol: AAPL\n name: Apple\n - symbol: MSFT\n name: Microsoft\n\n - type: releases\n cache: 1d\n # Without authentication the Github API allows for up to 60 requests per hour. You can create a\n # read-only token from your Github account settings and use it here to increase the limit.\n # token: ...\n repositories:\n - glanceapp/glance\n - go-gitea/gitea\n - immich-app/immich\n - syncthing/syncthing\n\n # Add more pages here:\n # - name: Your page name\n # columns:\n # - size: small\n # widgets:\n # # Add widgets here\n\n # - size: full\n # widgets:\n # # Add widgets here\n\n # - size: small\n # widgets:\n # # Add widgets here\n" + "content": "pages:\n - name: Home\n # Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look\n # hide-desktop-navigation: true\n columns:\n - size: small\n widgets:\n - type: calendar\n first-day-of-week: monday\n\n - type: rss\n limit: 10\n collapse-after: 3\n cache: 12h\n feeds:\n - url: https://selfh.st/rss/\n title: selfh.st\n limit: 4\n - url: https://ciechanow.ski/atom.xml\n - url: https://www.joshwcomeau.com/rss.xml\n title: Josh Comeau\n - url: https://samwho.dev/rss.xml\n - url: https://ishadeed.com/feed.xml\n title: Ahmad Shadeed\n\n - type: twitch-channels\n channels:\n - theprimeagen\n - j_blow\n - giantwaffle\n - cohhcarnage\n - christitustech\n - EJ_SA\n\n - size: full\n widgets:\n - type: group\n widgets:\n - type: hacker-news\n - type: lobsters\n\n - type: videos\n channels:\n - UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips\n - UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling\n - UCsBjURrPoezykLs9EqgamOA # Fireship\n - UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee\n - UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium\n\n - type: group\n widgets:\n - type: reddit\n subreddit: technology\n show-thumbnails: true\n - type: reddit\n subreddit: selfhosted\n show-thumbnails: true\n\n - size: small\n widgets:\n - type: weather\n location: London, United Kingdom\n units: metric # alternatively \"imperial\"\n hour-format: 12h # alternatively \"24h\"\n # Optionally hide the location from being displayed in the widget\n # hide-location: true\n\n - type: markets\n markets:\n - symbol: SPY\n name: S&P 500\n - symbol: BTC-USD\n name: Bitcoin\n - symbol: NVDA\n name: NVIDIA\n - symbol: AAPL\n name: Apple\n - symbol: MSFT\n name: Microsoft\n\n - type: releases\n cache: 1d\n # Without authentication the Github API allows for up to 60 requests per hour. You can create a\n # read-only token from your Github account settings and use it here to increase the limit.\n # token: ...\n repositories:\n - glanceapp/glance\n - go-gitea/gitea\n - immich-app/immich\n - syncthing/syncthing\n\n # Add more pages here:\n # - name: Your page name\n # columns:\n # - size: small\n # widgets:\n # # Add widgets here\n\n # - size: full\n # widgets:\n # # Add widgets here\n\n # - size: small\n # widgets:\n # # Add widgets here\n", + "only_if_missing": true } ] } diff --git a/oci/catalog/apps/homer.json b/oci/catalog/apps/homer.json index 2172d3d1..b6871ca2 100644 --- a/oci/catalog/apps/homer.json +++ b/oci/catalog/apps/homer.json @@ -379,7 +379,8 @@ "container_path": "/www/assets/config.yml", "mode": "0644", "owner": "mapped-root", - "content": "---\ntitle: \"My Home Lab\"\nsubtitle: \"Self-hosted services\"\nheader: true\ncolumns: \"3\"\ndefaults:\n layout: columns\n colorTheme: auto\nservices:\n - name: \"Getting started\"\n icon: \"fas fa-book\"\n items:\n - name: \"Homer documentation\"\n icon: \"fas fa-book\"\n url: \"https://github.com/bastienwirtz/homer\"\n" + "content": "---\ntitle: \"My Home Lab\"\nsubtitle: \"Self-hosted services\"\nheader: true\ncolumns: \"3\"\ndefaults:\n layout: columns\n colorTheme: auto\nservices:\n - name: \"Getting started\"\n icon: \"fas fa-book\"\n items:\n - name: \"Homer documentation\"\n icon: \"fas fa-book\"\n url: \"https://github.com/bastienwirtz/homer\"\n", + "only_if_missing": true } ] } diff --git a/oci/catalog/apps/prometheus.json b/oci/catalog/apps/prometheus.json index e18bb678..ac64986a 100644 --- a/oci/catalog/apps/prometheus.json +++ b/oci/catalog/apps/prometheus.json @@ -33,7 +33,7 @@ "documentation": "https://prometheus.io/docs/prometheus/latest/installation/", "repository": "https://github.com/prometheus/prometheus", "tips": [ - "The image includes a sample configuration and will scrape itself. Add targets to /etc/prometheus/prometheus.yml for monitoring other services." + "The image includes a sample configuration and will scrape itself. Add targets to prometheus.yml in the /etc/prometheus volume to monitor other services; choose a host directory for /etc/prometheus to edit it from the host." ], "mini_changelog": [], "display_version": null, @@ -77,6 +77,22 @@ "backup": true, "default_size_gb": 8 } + }, + { + "id": "volume-1", + "container_path": "/etc/prometheus", + "compose_source_example": "./prometheus-config", + "read_only": false, + "required": true, + "installation_choice": [ + "managed-volume", + "host-bind" + ], + "default": "managed-volume", + "managed_volume": { + "backup": true, + "default_size_gb": 1 + } } ], "ports": [ @@ -142,6 +158,17 @@ "shared_with_other_lxc": false, "source_path": null, "source_path_prompt": null + }, + { + "id": "prometheus-volume-1", + "service": "prometheus", + "container_path": "/etc/prometheus", + "mode": "managed-volume", + "user_selectable": false, + "backup": true, + "shared_with_other_lxc": false, + "source_path": null, + "source_path_prompt": null } ], "orchestration": { @@ -356,6 +383,12 @@ "remove_lost_found": true, "owner_strategy": "mapped-application-user", "only_when_mount_type": "managed-volume" + }, + { + "container_path": "/etc/prometheus", + "remove_lost_found": true, + "owner_strategy": "mapped-application-user", + "only_when_mount_type": "managed-volume" } ], "startup_healthcheck": { diff --git a/oci/catalog/curated/glance.json b/oci/catalog/curated/glance.json index 2cea577d..09a241f9 100644 --- a/oci/catalog/curated/glance.json +++ b/oci/catalog/curated/glance.json @@ -374,7 +374,8 @@ "container_path": "/app/config/glance.yml", "mode": "0644", "owner": "mapped-root", - "content": "pages:\n - name: Home\n # Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look\n # hide-desktop-navigation: true\n columns:\n - size: small\n widgets:\n - type: calendar\n first-day-of-week: monday\n\n - type: rss\n limit: 10\n collapse-after: 3\n cache: 12h\n feeds:\n - url: https://selfh.st/rss/\n title: selfh.st\n limit: 4\n - url: https://ciechanow.ski/atom.xml\n - url: https://www.joshwcomeau.com/rss.xml\n title: Josh Comeau\n - url: https://samwho.dev/rss.xml\n - url: https://ishadeed.com/feed.xml\n title: Ahmad Shadeed\n\n - type: twitch-channels\n channels:\n - theprimeagen\n - j_blow\n - giantwaffle\n - cohhcarnage\n - christitustech\n - EJ_SA\n\n - size: full\n widgets:\n - type: group\n widgets:\n - type: hacker-news\n - type: lobsters\n\n - type: videos\n channels:\n - UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips\n - UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling\n - UCsBjURrPoezykLs9EqgamOA # Fireship\n - UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee\n - UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium\n\n - type: group\n widgets:\n - type: reddit\n subreddit: technology\n show-thumbnails: true\n - type: reddit\n subreddit: selfhosted\n show-thumbnails: true\n\n - size: small\n widgets:\n - type: weather\n location: London, United Kingdom\n units: metric # alternatively \"imperial\"\n hour-format: 12h # alternatively \"24h\"\n # Optionally hide the location from being displayed in the widget\n # hide-location: true\n\n - type: markets\n markets:\n - symbol: SPY\n name: S&P 500\n - symbol: BTC-USD\n name: Bitcoin\n - symbol: NVDA\n name: NVIDIA\n - symbol: AAPL\n name: Apple\n - symbol: MSFT\n name: Microsoft\n\n - type: releases\n cache: 1d\n # Without authentication the Github API allows for up to 60 requests per hour. You can create a\n # read-only token from your Github account settings and use it here to increase the limit.\n # token: ...\n repositories:\n - glanceapp/glance\n - go-gitea/gitea\n - immich-app/immich\n - syncthing/syncthing\n\n # Add more pages here:\n # - name: Your page name\n # columns:\n # - size: small\n # widgets:\n # # Add widgets here\n\n # - size: full\n # widgets:\n # # Add widgets here\n\n # - size: small\n # widgets:\n # # Add widgets here\n" + "content": "pages:\n - name: Home\n # Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look\n # hide-desktop-navigation: true\n columns:\n - size: small\n widgets:\n - type: calendar\n first-day-of-week: monday\n\n - type: rss\n limit: 10\n collapse-after: 3\n cache: 12h\n feeds:\n - url: https://selfh.st/rss/\n title: selfh.st\n limit: 4\n - url: https://ciechanow.ski/atom.xml\n - url: https://www.joshwcomeau.com/rss.xml\n title: Josh Comeau\n - url: https://samwho.dev/rss.xml\n - url: https://ishadeed.com/feed.xml\n title: Ahmad Shadeed\n\n - type: twitch-channels\n channels:\n - theprimeagen\n - j_blow\n - giantwaffle\n - cohhcarnage\n - christitustech\n - EJ_SA\n\n - size: full\n widgets:\n - type: group\n widgets:\n - type: hacker-news\n - type: lobsters\n\n - type: videos\n channels:\n - UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips\n - UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling\n - UCsBjURrPoezykLs9EqgamOA # Fireship\n - UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee\n - UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium\n\n - type: group\n widgets:\n - type: reddit\n subreddit: technology\n show-thumbnails: true\n - type: reddit\n subreddit: selfhosted\n show-thumbnails: true\n\n - size: small\n widgets:\n - type: weather\n location: London, United Kingdom\n units: metric # alternatively \"imperial\"\n hour-format: 12h # alternatively \"24h\"\n # Optionally hide the location from being displayed in the widget\n # hide-location: true\n\n - type: markets\n markets:\n - symbol: SPY\n name: S&P 500\n - symbol: BTC-USD\n name: Bitcoin\n - symbol: NVDA\n name: NVIDIA\n - symbol: AAPL\n name: Apple\n - symbol: MSFT\n name: Microsoft\n\n - type: releases\n cache: 1d\n # Without authentication the Github API allows for up to 60 requests per hour. You can create a\n # read-only token from your Github account settings and use it here to increase the limit.\n # token: ...\n repositories:\n - glanceapp/glance\n - go-gitea/gitea\n - immich-app/immich\n - syncthing/syncthing\n\n # Add more pages here:\n # - name: Your page name\n # columns:\n # - size: small\n # widgets:\n # # Add widgets here\n\n # - size: full\n # widgets:\n # # Add widgets here\n\n # - size: small\n # widgets:\n # # Add widgets here\n", + "only_if_missing": true } ] } diff --git a/oci/catalog/curated/homer.json b/oci/catalog/curated/homer.json index 2172d3d1..b6871ca2 100644 --- a/oci/catalog/curated/homer.json +++ b/oci/catalog/curated/homer.json @@ -379,7 +379,8 @@ "container_path": "/www/assets/config.yml", "mode": "0644", "owner": "mapped-root", - "content": "---\ntitle: \"My Home Lab\"\nsubtitle: \"Self-hosted services\"\nheader: true\ncolumns: \"3\"\ndefaults:\n layout: columns\n colorTheme: auto\nservices:\n - name: \"Getting started\"\n icon: \"fas fa-book\"\n items:\n - name: \"Homer documentation\"\n icon: \"fas fa-book\"\n url: \"https://github.com/bastienwirtz/homer\"\n" + "content": "---\ntitle: \"My Home Lab\"\nsubtitle: \"Self-hosted services\"\nheader: true\ncolumns: \"3\"\ndefaults:\n layout: columns\n colorTheme: auto\nservices:\n - name: \"Getting started\"\n icon: \"fas fa-book\"\n items:\n - name: \"Homer documentation\"\n icon: \"fas fa-book\"\n url: \"https://github.com/bastienwirtz/homer\"\n", + "only_if_missing": true } ] } diff --git a/oci/catalog/curated/prometheus.json b/oci/catalog/curated/prometheus.json index e18bb678..ac64986a 100644 --- a/oci/catalog/curated/prometheus.json +++ b/oci/catalog/curated/prometheus.json @@ -33,7 +33,7 @@ "documentation": "https://prometheus.io/docs/prometheus/latest/installation/", "repository": "https://github.com/prometheus/prometheus", "tips": [ - "The image includes a sample configuration and will scrape itself. Add targets to /etc/prometheus/prometheus.yml for monitoring other services." + "The image includes a sample configuration and will scrape itself. Add targets to prometheus.yml in the /etc/prometheus volume to monitor other services; choose a host directory for /etc/prometheus to edit it from the host." ], "mini_changelog": [], "display_version": null, @@ -77,6 +77,22 @@ "backup": true, "default_size_gb": 8 } + }, + { + "id": "volume-1", + "container_path": "/etc/prometheus", + "compose_source_example": "./prometheus-config", + "read_only": false, + "required": true, + "installation_choice": [ + "managed-volume", + "host-bind" + ], + "default": "managed-volume", + "managed_volume": { + "backup": true, + "default_size_gb": 1 + } } ], "ports": [ @@ -142,6 +158,17 @@ "shared_with_other_lxc": false, "source_path": null, "source_path_prompt": null + }, + { + "id": "prometheus-volume-1", + "service": "prometheus", + "container_path": "/etc/prometheus", + "mode": "managed-volume", + "user_selectable": false, + "backup": true, + "shared_with_other_lxc": false, + "source_path": null, + "source_path_prompt": null } ], "orchestration": { @@ -356,6 +383,12 @@ "remove_lost_found": true, "owner_strategy": "mapped-application-user", "only_when_mount_type": "managed-volume" + }, + { + "container_path": "/etc/prometheus", + "remove_lost_found": true, + "owner_strategy": "mapped-application-user", + "only_when_mount_type": "managed-volume" } ], "startup_healthcheck": {