Give each settings-config runtime a mergeable config file with its own id (runtime-config) — the previous "config" collided with modules that already own a config directory, so ten runtimes mounted a config file no resource declared. Point each runtime's restart-on at it, so a settings change recreates the runtime and it re-reads the new value (needs the mesh-host container restart-on fix on issue/009-container-restart-on). Proven: runtime-restart-on-config e2e green. Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
93 lines
2.2 KiB
JSON
93 lines
2.2 KiB
JSON
{
|
|
"module": "nzbget",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"emits": [
|
|
"module.nzbget.download.added",
|
|
"module.nzbget.download.completed"
|
|
],
|
|
"consumes": [],
|
|
"own-secrets": {
|
|
"broker": "/var/lib/mesh/nzbget/broker"
|
|
},
|
|
"listens": [
|
|
{
|
|
"port": 6789,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "the download client's pages"
|
|
}
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/nzbget",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "config",
|
|
"type": "directory",
|
|
"path": "/services/nzbget/config",
|
|
"mode": "0700",
|
|
"owner": "1000:1000"
|
|
},
|
|
{
|
|
"id": "media-downloads",
|
|
"type": "directory",
|
|
"path": "/services/media/downloads",
|
|
"mode": "0755",
|
|
"owner": "1000:1000"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "nzbget",
|
|
"image": "lscr.io/linuxserver/nzbget@sha256:5f3d3fa71029004156eff2cbf4ef4455ce4ce59517cf13fa7d1d7c8a4cd2c8a4",
|
|
"env": {
|
|
"PUID": "1000",
|
|
"PGID": "1000",
|
|
"TZ": "Etc/UTC"
|
|
},
|
|
"ports": [
|
|
"6789"
|
|
],
|
|
"volumes": [
|
|
"/services/nzbget/config:/config",
|
|
"/services/media/downloads:/downloads"
|
|
]
|
|
},
|
|
{
|
|
"id": "runtime-config",
|
|
"type": "file",
|
|
"path": "/var/lib/mesh/nzbget/config.json",
|
|
"mode": "0600",
|
|
"content": "{}\n",
|
|
"merge": "json"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-nzbget",
|
|
"image": "mesh-runtime-nzbget@sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
"network": "host",
|
|
"volumes": [
|
|
"/var/lib/mesh/nzbget/broker:/run/secrets/broker:ro",
|
|
"/var/lib/mesh/nzbget/config.json:/run/config/config.json:ro",
|
|
"/services/nzbget/config:/var/lib/nzbget/config:ro"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_NZBGET_URL": "http://127.0.0.1:6789",
|
|
"MESH_NZBGET_CONFIG_FILE": "/run/config/config.json",
|
|
"MESH_NZBGET_CONFIG_DIR": "/var/lib/nzbget/config"
|
|
},
|
|
"restart-on": [
|
|
"runtime-config"
|
|
]
|
|
}
|
|
]
|
|
}
|