The mesh-nzbget container goes with its Dockerfile, build bases and bus credential; its env becomes the bundle's words with mount targets folded back to host paths.
155 lines
3.4 KiB
JSON
155 lines
3.4 KiB
JSON
{
|
|
"module": "nzbget",
|
|
"version": "1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"emits": [
|
|
"download.added",
|
|
"download.completed"
|
|
],
|
|
"consumes": [],
|
|
"own-secrets": {
|
|
"password": {
|
|
"path": "${dir:mesh-state}/password",
|
|
"taken": "at-start"
|
|
}
|
|
},
|
|
"listens": [
|
|
{
|
|
"name": "web",
|
|
"port": 6789,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "the download client's pages, and the JSON-RPC API its consumers and its own tools call"
|
|
}
|
|
],
|
|
"accesses": [
|
|
{
|
|
"id": "downloads",
|
|
"path": "/services/media/downloads",
|
|
"mode": "read-write"
|
|
}
|
|
],
|
|
"resources": [
|
|
{
|
|
"id": "mesh-state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "mesh"
|
|
},
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "config",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"owner": "1000:1000"
|
|
},
|
|
{
|
|
"id": "identity",
|
|
"type": "file",
|
|
"path": "${dir:state}/identity.env",
|
|
"mode": "0644",
|
|
"content": "# The identity this module's process runs as on THIS machine: the owner of its\n# data here, which the definition may not know (novox/hq ADR 0112, issue 153). Set puid and\n# pgid on the assignment \u2014 the mesh-wide layer carries the image's default, a node's its own.\nPUID=${setting:puid}\nPGID=${setting:pgid}\n"
|
|
},
|
|
{
|
|
"id": "server-env",
|
|
"type": "file",
|
|
"path": "${dir:state}/server.env",
|
|
"mode": "0644",
|
|
"content": "NZBGET_USER=${setting:username}\n"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "nzbget",
|
|
"image": "lscr.io/linuxserver/nzbget@sha256:ec3ef0ae7dc410084086a7fdd447deda4747531154aa1cc5c7c48ac60794e277",
|
|
"env": {
|
|
"TZ": "Etc/UTC",
|
|
"FILE__NZBGET_PASS": "/run/secrets/password"
|
|
},
|
|
"ports": [
|
|
"6789"
|
|
],
|
|
"volumes": [
|
|
"${dir:config}:/config",
|
|
"${access:downloads}:/downloads",
|
|
"${dir:mesh-state}/password:/run/secrets/password:ro"
|
|
],
|
|
"restart-on": [
|
|
"needs-password",
|
|
"identity",
|
|
"server-env"
|
|
],
|
|
"env-file": [
|
|
"${dir:state}/identity.env",
|
|
"${dir:state}/server.env"
|
|
]
|
|
},
|
|
{
|
|
"id": "runtime-config",
|
|
"type": "file",
|
|
"path": "${dir:state}/config.json",
|
|
"mode": "0600",
|
|
"content": "{}\n",
|
|
"merge": "json"
|
|
}
|
|
],
|
|
"provides": [
|
|
{
|
|
"name": "nzbget-api",
|
|
"credential": {
|
|
"own": "password"
|
|
}
|
|
}
|
|
],
|
|
"serves": {
|
|
"nzbget-api": {
|
|
"scheme": "http",
|
|
"port": 6789,
|
|
"url-base": "",
|
|
"username": "nzbget"
|
|
}
|
|
},
|
|
"requires": [
|
|
"route"
|
|
],
|
|
"contributes": {
|
|
"route": {
|
|
"label": "nzbget",
|
|
"endpoint": "web"
|
|
}
|
|
},
|
|
"binds": {
|
|
"route": "${dir:state}/route.json"
|
|
},
|
|
"build": {
|
|
"artifacts": [
|
|
{
|
|
"name": "code",
|
|
"kind": "bundle",
|
|
"language": "typescript",
|
|
"entrypoints": [
|
|
"index.js",
|
|
"tools/index.js"
|
|
],
|
|
"loads": [
|
|
"index.js",
|
|
"tools/index.js"
|
|
],
|
|
"env": {
|
|
"MESH_NZBGET_URL": "http://127.0.0.1:${port:6789}",
|
|
"MESH_NZBGET_PASSWORD_FILE": "${dir:mesh-state}/password",
|
|
"MESH_NZBGET_CONFIG_FILE": "${dir:state}/config.json",
|
|
"MESH_NZBGET_CONFIG_DIR": "${dir:config}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|