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.
This commit is contained in:
MacRimi
2026-10-26 07:28:40 +01:00
parent f2854ebece
commit fab4aee37a
6 changed files with 76 additions and 6 deletions
+2 -1
View File
@@ -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
}
]
}
+2 -1
View File
@@ -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
}
]
}
+34 -1
View File
@@ -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": {
+2 -1
View File
@@ -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
}
]
}
+2 -1
View File
@@ -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
}
]
}
+34 -1
View File
@@ -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": {