Ten definitions name each access by id; the path stays as the default an assignment may replace,
and the host side of every mount says ${access:<id>}. Resolved with no placement, every definition
names exactly the paths it named before (TestPlacedDirectoriesKeepTheirPaths, extended). On an
adopted machine the assignment now says `accesses: {<id>: <path>}` and the mount follows.
Needs the controller that knows an access id (mesh-controller #176); the running one refuses the
field at registration.
146 lines
3.1 KiB
JSON
146 lines
3.1 KiB
JSON
{
|
|
"module": "bazarr",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"emits": [
|
|
"subtitle.downloaded"
|
|
],
|
|
"own-secrets": {
|
|
"broker": "${dir:mesh-state}/broker",
|
|
"api-key": "${dir:mesh-state}/api-key"
|
|
},
|
|
"listens": [
|
|
{
|
|
"name": "web",
|
|
"port": 6767,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "managing subtitles"
|
|
}
|
|
],
|
|
"accesses": [
|
|
{
|
|
"id": "movies",
|
|
"path": "/services/media/movies",
|
|
"mode": "read-write"
|
|
},
|
|
{
|
|
"id": "series",
|
|
"path": "/services/media/series",
|
|
"mode": "read-write"
|
|
},
|
|
{
|
|
"id": "anime",
|
|
"path": "/services/media/anime",
|
|
"mode": "read-write"
|
|
},
|
|
{
|
|
"id": "downloads",
|
|
"path": "/services/media/downloads",
|
|
"mode": "read"
|
|
}
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "mesh"
|
|
},
|
|
{
|
|
"id": "config",
|
|
"type": "directory",
|
|
"path": "/services/bazarr/config",
|
|
"mode": "0700",
|
|
"owner": "1000:1000"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "bazarr",
|
|
"image": "lscr.io/linuxserver/bazarr@sha256:3a820372f19fcb2981ea19fe4b5382934d67414afaba974bce831ddda0a64a02",
|
|
"env": {
|
|
"PUID": "1000",
|
|
"PGID": "1000",
|
|
"TZ": "Etc/UTC"
|
|
},
|
|
"ports": [
|
|
"6767"
|
|
],
|
|
"volumes": [
|
|
"/services/bazarr/config:/config",
|
|
"${access:movies}:/movies",
|
|
"${access:series}:/series",
|
|
"${access:anime}:/anime",
|
|
"${access:downloads}:/downloads"
|
|
]
|
|
},
|
|
{
|
|
"id": "runtime-config",
|
|
"type": "file",
|
|
"path": "${dir:mesh-state}/config.json",
|
|
"mode": "0600",
|
|
"content": "{}\n",
|
|
"merge": "json"
|
|
},
|
|
{
|
|
"id": "runtime",
|
|
"type": "container",
|
|
"name": "mesh-bazarr",
|
|
"network": "host",
|
|
"volumes": [
|
|
"${dir:mesh-state}/broker:/run/secrets/broker:ro",
|
|
"${dir:mesh-state}/api-key:/run/secrets/api-key:ro",
|
|
"${dir:mesh-state}/config.json:/run/config/config.json:ro",
|
|
"/services/bazarr/config:/var/lib/bazarr/config:ro"
|
|
],
|
|
"env": {
|
|
"MESH_BROKER_FILE": "/run/secrets/broker",
|
|
"MESH_BAZARR_URL": "http://127.0.0.1:6767",
|
|
"MESH_BAZARR_API_KEY_FILE": "/run/secrets/api-key",
|
|
"MESH_BAZARR_CONFIG_FILE": "/run/config/config.json",
|
|
"MESH_BAZARR_CONFIG_DIR": "/var/lib/bazarr/config"
|
|
},
|
|
"restart-on": [
|
|
"runtime-config"
|
|
],
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"requires": [
|
|
"route"
|
|
],
|
|
"contributes": {
|
|
"route": {
|
|
"label": "subs",
|
|
"endpoint": "web"
|
|
}
|
|
},
|
|
"binds": {
|
|
"route": "${dir:mesh-state}/route.json"
|
|
},
|
|
"build": {
|
|
"on": [
|
|
{
|
|
"arg": "BUILD_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "build"
|
|
},
|
|
{
|
|
"arg": "RUNTIME_BASE",
|
|
"module": "mesh-tools",
|
|
"artifact": "runtime"
|
|
}
|
|
],
|
|
"artifacts": [
|
|
{
|
|
"name": "runtime",
|
|
"kind": "image",
|
|
"from": "Dockerfile"
|
|
}
|
|
]
|
|
}
|
|
}
|