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
73 lines
1.8 KiB
JSON
73 lines
1.8 KiB
JSON
{
|
|
"module": "portainer",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"listens": [
|
|
{
|
|
"port": 9443,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "the container dashboard, over its own tls"
|
|
}
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"path": "/var/lib/mesh/portainer",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "data",
|
|
"type": "directory",
|
|
"path": "/services/portainer/data",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "portainer",
|
|
"image": "portainer/portainer-ce@sha256:511f3f06c96fe3b993ebeaafde311c1959cae73a7ef825dba6397d51b450dffa",
|
|
"ports": [
|
|
"9443"
|
|
],
|
|
"volumes": [
|
|
"/services/portainer/data:/data",
|
|
"/var/run/docker.sock:/var/run/docker.sock"
|
|
]
|
|
},
|
|
{
|
|
"id": "runtime-config",
|
|
"type": "file",
|
|
"path": "/var/lib/mesh/portainer/config.json",
|
|
"mode": "0600",
|
|
"content": "{}\n",
|
|
"merge": "json"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-portainer",
|
|
"image": "mesh-runtime-portainer@sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
"network": "host",
|
|
"volumes": [
|
|
"/var/lib/mesh/portainer/broker:/run/secrets/broker:ro",
|
|
"/var/lib/mesh/portainer/config.json:/run/config/config.json:ro"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_PORTAINER_URL": "https://127.0.0.1:9443",
|
|
"MESH_PORTAINER_CONFIG_FILE": "/run/config/config.json"
|
|
},
|
|
"restart-on": [
|
|
"runtime-config"
|
|
]
|
|
}
|
|
],
|
|
"own-secrets": {
|
|
"broker": "/var/lib/mesh/portainer/broker"
|
|
}
|
|
}
|