Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1febc053f | ||
|
|
cd5688ac3f |
@@ -13,7 +13,7 @@ ARG RUNTIME_BASE
|
||||
FROM ${BUILD_BASE} AS build
|
||||
WORKDIR /app/modules/lidarr
|
||||
COPY . .
|
||||
RUN node /app/node_modules/typescript/bin/tsc client.ts index.ts tools/index.ts \
|
||||
RUN node /app/node_modules/typescript/bin/tsc client.ts index.ts tools/index.ts downloads/settings.ts downloads/index.ts \
|
||||
--module NodeNext --moduleResolution NodeNext --target ES2022 --outDir dist
|
||||
|
||||
FROM ${RUNTIME_BASE}
|
||||
@@ -22,3 +22,6 @@ COPY --from=build /app/modules/lidarr/dist /app/modules/lidarr/dist
|
||||
# provider's provisioner runs its reconcile loop in the same process, with the broker connected —
|
||||
# the convention novox/hq issues 060/061 settled.
|
||||
ENV MESH_TOOL_MODULES=/app/modules/lidarr/dist/index.js,/app/modules/lidarr/dist/tools/index.js
|
||||
# NOT dist/downloads/index.js: that is a step the host runs to completion, named by the `downloads`
|
||||
# container's args as `mesh-tools run …` (novox/hq ADR 0052). Listed here it would run inside the
|
||||
# serving sidecar too, and exit it.
|
||||
|
||||
@@ -51,18 +51,33 @@
|
||||
"path": "/var/lib/mesh/lidarr",
|
||||
"mode": "0700"
|
||||
},
|
||||
{
|
||||
"id": "state",
|
||||
"type": "directory",
|
||||
"mode": "0700",
|
||||
"place": "."
|
||||
},
|
||||
{
|
||||
"id": "config",
|
||||
"type": "directory",
|
||||
"path": "/services/lidarr/config",
|
||||
"mode": "0700",
|
||||
"owner": "1000:1000"
|
||||
},
|
||||
{
|
||||
"id": "custom-cont-init",
|
||||
"type": "directory",
|
||||
"mode": "0755"
|
||||
},
|
||||
{
|
||||
"id": "custom-services",
|
||||
"type": "directory",
|
||||
"mode": "0755"
|
||||
},
|
||||
{
|
||||
"id": "server",
|
||||
"type": "container",
|
||||
"name": "lidarr",
|
||||
"image": "lscr.io/linuxserver/lidarr@sha256:6b38dd330b0c653351c2e23c8b962ea51c95683dd7acace9d106c922baf85f75",
|
||||
"image": "lscr.io/linuxserver/lidarr@sha256:8ab0fd370b604ae034d9a9c261a9d8d873bece33d9736852e7ce4f3566e4a35d",
|
||||
"env": {
|
||||
"PUID": "1000",
|
||||
"PGID": "1000",
|
||||
@@ -72,7 +87,9 @@
|
||||
"8686"
|
||||
],
|
||||
"volumes": [
|
||||
"/services/lidarr/config:/config",
|
||||
"${dir:config}:/config",
|
||||
"${dir:custom-cont-init}:/custom-cont-init.d",
|
||||
"${dir:custom-services}:/custom-services.d",
|
||||
"/services/media/music:/music",
|
||||
"/services/media/downloads:/downloads"
|
||||
]
|
||||
@@ -84,7 +101,7 @@
|
||||
"network": "host",
|
||||
"volumes": [
|
||||
"/var/lib/mesh/lidarr/broker:/run/secrets/broker:ro",
|
||||
"/services/lidarr/config:/var/lib/lidarr/config:ro"
|
||||
"${dir:config}:/var/lib/lidarr/config:ro"
|
||||
],
|
||||
"env": {
|
||||
"MESH_BROKER_FILE": "/run/secrets/broker",
|
||||
@@ -92,9 +109,66 @@
|
||||
"MESH_LIDARR_CONFIG_DIR": "/var/lib/lidarr/config"
|
||||
},
|
||||
"artifact": "runtime"
|
||||
},
|
||||
{
|
||||
"id": "downloads-config",
|
||||
"type": "file",
|
||||
"path": "${dir:state}/downloads.json",
|
||||
"mode": "0600",
|
||||
"content": "{\n \"node\": \"${machine:name}\",\n \"downloads\": {\n \"nzbget-api\": {\n \"name\": \"nzbget\"\n },\n \"qbittorrent-api\": {\n \"name\": \"qbittorrent\"\n },\n \"jackett-api\": {\n \"adopt-hosts\": [],\n \"indexers\": []\n }\n }\n}\n",
|
||||
"merge": "json"
|
||||
},
|
||||
{
|
||||
"id": "downloads-memory",
|
||||
"type": "directory",
|
||||
"mode": "0700"
|
||||
},
|
||||
{
|
||||
"id": "downloads",
|
||||
"type": "container",
|
||||
"name": "mesh-lidarr-downloads",
|
||||
"network": "host",
|
||||
"run-once": true,
|
||||
"volumes": [
|
||||
"${dir:state}/downloads.json:/run/downloads/downloads.json:ro",
|
||||
"${dir:state}/nzbget-api.json:/run/downloads/nzbget-api.json:ro",
|
||||
"${dir:state}/nzbget-api.secret:/run/downloads/nzbget-api.secret:ro",
|
||||
"${dir:state}/qbittorrent-api.json:/run/downloads/qbittorrent-api.json:ro",
|
||||
"${dir:state}/qbittorrent-api.secret:/run/downloads/qbittorrent-api.secret:ro",
|
||||
"${dir:state}/jackett-api.json:/run/downloads/jackett-api.json:ro",
|
||||
"${dir:state}/jackett-api.secret:/run/downloads/jackett-api.secret:ro",
|
||||
"${dir:config}:/var/lib/lidarr/config:ro",
|
||||
"${dir:downloads-memory}:/var/lib/downloads"
|
||||
],
|
||||
"env": {
|
||||
"MESH_DOWNLOADS_APP": "lidarr",
|
||||
"MESH_DOWNLOADS_API": "v1",
|
||||
"MESH_DOWNLOADS_APP_URL": "http://127.0.0.1:${port:8686}",
|
||||
"MESH_DOWNLOADS_APP_CONFIG": "/var/lib/lidarr/config/config.xml",
|
||||
"MESH_DOWNLOADS_DIR": "/run/downloads",
|
||||
"MESH_DOWNLOADS_SETTINGS": "/run/downloads/downloads.json",
|
||||
"MESH_DOWNLOADS_MEMORY": "/var/lib/downloads/memory.json"
|
||||
},
|
||||
"args": [
|
||||
"run",
|
||||
"/app/modules/lidarr/dist/downloads/index.js"
|
||||
],
|
||||
"restart-on": [
|
||||
"downloads-config",
|
||||
"bound-nzbget-api",
|
||||
"secret-nzbget-api",
|
||||
"bound-qbittorrent-api",
|
||||
"secret-qbittorrent-api",
|
||||
"bound-jackett-api",
|
||||
"secret-jackett-api"
|
||||
],
|
||||
"artifact": "runtime"
|
||||
}
|
||||
],
|
||||
"requires": [
|
||||
"jackett-api",
|
||||
"nzbget-api",
|
||||
"qbittorrent-api",
|
||||
"route"
|
||||
],
|
||||
"contributes": {
|
||||
@@ -104,7 +178,15 @@
|
||||
}
|
||||
},
|
||||
"binds": {
|
||||
"route": "/var/lib/mesh/lidarr/route.json"
|
||||
"route": "${dir:state}/route.json",
|
||||
"nzbget-api": "${dir:state}/nzbget-api.json",
|
||||
"qbittorrent-api": "${dir:state}/qbittorrent-api.json",
|
||||
"jackett-api": "${dir:state}/jackett-api.json"
|
||||
},
|
||||
"secrets": {
|
||||
"nzbget-api": "${dir:state}/nzbget-api.secret",
|
||||
"qbittorrent-api": "${dir:state}/qbittorrent-api.secret",
|
||||
"jackett-api": "${dir:state}/jackett-api.secret"
|
||||
},
|
||||
"build": {
|
||||
"on": [
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
"description": "lidarr — music management. Its API client, tools and events live here (novox/hq ADR 0039).",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "tsc client.ts index.ts tools/index.ts downloads/settings.ts downloads/index.ts --module NodeNext --moduleResolution NodeNext --target ES2022 --outDir dist",
|
||||
"typecheck": "tsc -p tsconfig.json",
|
||||
"test": "node --test --experimental-strip-types 'test/*.test.ts'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@novox/mesh-sdk": "^0.1.0"
|
||||
},
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
"skipLibCheck": true,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["client.ts", "index.ts", "tools/index.ts"]
|
||||
"include": ["client.ts", "index.ts", "tools/index.ts", "downloads/settings.ts", "downloads/index.ts"]
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ ARG RUNTIME_BASE
|
||||
FROM ${BUILD_BASE} AS build
|
||||
WORKDIR /app/modules/radarr
|
||||
COPY . .
|
||||
RUN node /app/node_modules/typescript/bin/tsc client.ts index.ts tools/index.ts downloads/settings.ts downloads/index.ts \
|
||||
RUN node /app/node_modules/typescript/bin/tsc client.ts index.ts tools/index.ts \
|
||||
--module NodeNext --moduleResolution NodeNext --target ES2022 --outDir dist
|
||||
|
||||
FROM ${RUNTIME_BASE}
|
||||
@@ -22,6 +22,3 @@ COPY --from=build /app/modules/radarr/dist /app/modules/radarr/dist
|
||||
# provider's provisioner runs its reconcile loop in the same process, with the broker connected —
|
||||
# the convention novox/hq issues 060/061 settled.
|
||||
ENV MESH_TOOL_MODULES=/app/modules/radarr/dist/index.js,/app/modules/radarr/dist/tools/index.js
|
||||
# NOT dist/downloads/index.js: that is a step the host runs to completion, named by the `downloads`
|
||||
# container's args as `mesh-tools run …` (novox/hq ADR 0052). Listed here it would run inside the
|
||||
# serving sidecar too, and exit it.
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"port": 7878,
|
||||
"protocol": "tcp",
|
||||
"from": "mesh",
|
||||
"why": "managing films: its web UI, and the API other modules reach as radarr-api"
|
||||
"why": "managing films"
|
||||
}
|
||||
],
|
||||
"accesses": [
|
||||
@@ -51,15 +51,10 @@
|
||||
"path": "/var/lib/mesh/radarr",
|
||||
"mode": "0700"
|
||||
},
|
||||
{
|
||||
"id": "state",
|
||||
"type": "directory",
|
||||
"mode": "0700",
|
||||
"place": "."
|
||||
},
|
||||
{
|
||||
"id": "config",
|
||||
"type": "directory",
|
||||
"path": "/services/radarr/config",
|
||||
"mode": "0700",
|
||||
"owner": "1000:1000"
|
||||
},
|
||||
@@ -67,7 +62,7 @@
|
||||
"id": "server",
|
||||
"type": "container",
|
||||
"name": "radarr",
|
||||
"image": "lscr.io/linuxserver/radarr@sha256:c960f2b52ec6542dbe6707c5a21e696a7c74fd8b17997454f4d10a55dacee133",
|
||||
"image": "lscr.io/linuxserver/radarr@sha256:119aaa4a4f7349bcd2a136c5373a0d7925b5479915c7dfe0c0ad352db2a6d438",
|
||||
"env": {
|
||||
"PUID": "1000",
|
||||
"PGID": "1000",
|
||||
@@ -77,7 +72,7 @@
|
||||
"7878"
|
||||
],
|
||||
"volumes": [
|
||||
"${dir:config}:/config",
|
||||
"/services/radarr/config:/config",
|
||||
"/services/media/movies:/movies",
|
||||
"/services/media/downloads:/downloads"
|
||||
]
|
||||
@@ -89,7 +84,7 @@
|
||||
"network": "host",
|
||||
"volumes": [
|
||||
"/var/lib/mesh/radarr/broker:/run/secrets/broker:ro",
|
||||
"${dir:config}:/var/lib/radarr/config:ro"
|
||||
"/services/radarr/config:/var/lib/radarr/config:ro"
|
||||
],
|
||||
"env": {
|
||||
"MESH_BROKER_FILE": "/run/secrets/broker",
|
||||
@@ -97,66 +92,9 @@
|
||||
"MESH_RADARR_CONFIG_DIR": "/var/lib/radarr/config"
|
||||
},
|
||||
"artifact": "runtime"
|
||||
},
|
||||
{
|
||||
"id": "downloads-config",
|
||||
"type": "file",
|
||||
"path": "${dir:state}/downloads.json",
|
||||
"mode": "0600",
|
||||
"content": "{\n \"node\": \"${machine:name}\",\n \"downloads\": {\n \"nzbget-api\": {\n \"name\": \"nzbget\"\n },\n \"qbittorrent-api\": {\n \"name\": \"qbittorrent\"\n },\n \"jackett-api\": {\n \"adopt-hosts\": [],\n \"indexers\": []\n }\n }\n}\n",
|
||||
"merge": "json"
|
||||
},
|
||||
{
|
||||
"id": "downloads-memory",
|
||||
"type": "directory",
|
||||
"mode": "0700"
|
||||
},
|
||||
{
|
||||
"id": "downloads",
|
||||
"type": "container",
|
||||
"name": "mesh-radarr-downloads",
|
||||
"network": "host",
|
||||
"run-once": true,
|
||||
"volumes": [
|
||||
"${dir:state}/downloads.json:/run/downloads/downloads.json:ro",
|
||||
"${dir:state}/nzbget-api.json:/run/downloads/nzbget-api.json:ro",
|
||||
"${dir:state}/nzbget-api.secret:/run/downloads/nzbget-api.secret:ro",
|
||||
"${dir:state}/qbittorrent-api.json:/run/downloads/qbittorrent-api.json:ro",
|
||||
"${dir:state}/qbittorrent-api.secret:/run/downloads/qbittorrent-api.secret:ro",
|
||||
"${dir:state}/jackett-api.json:/run/downloads/jackett-api.json:ro",
|
||||
"${dir:state}/jackett-api.secret:/run/downloads/jackett-api.secret:ro",
|
||||
"${dir:config}:/var/lib/radarr/config:ro",
|
||||
"${dir:downloads-memory}:/var/lib/downloads"
|
||||
],
|
||||
"env": {
|
||||
"MESH_DOWNLOADS_APP": "radarr",
|
||||
"MESH_DOWNLOADS_API": "v3",
|
||||
"MESH_DOWNLOADS_APP_URL": "http://127.0.0.1:${port:7878}",
|
||||
"MESH_DOWNLOADS_APP_CONFIG": "/var/lib/radarr/config/config.xml",
|
||||
"MESH_DOWNLOADS_DIR": "/run/downloads",
|
||||
"MESH_DOWNLOADS_SETTINGS": "/run/downloads/downloads.json",
|
||||
"MESH_DOWNLOADS_MEMORY": "/var/lib/downloads/memory.json"
|
||||
},
|
||||
"args": [
|
||||
"run",
|
||||
"/app/modules/radarr/dist/downloads/index.js"
|
||||
],
|
||||
"restart-on": [
|
||||
"downloads-config",
|
||||
"bound-nzbget-api",
|
||||
"secret-nzbget-api",
|
||||
"bound-qbittorrent-api",
|
||||
"secret-qbittorrent-api",
|
||||
"bound-jackett-api",
|
||||
"secret-jackett-api"
|
||||
],
|
||||
"artifact": "runtime"
|
||||
}
|
||||
],
|
||||
"requires": [
|
||||
"jackett-api",
|
||||
"nzbget-api",
|
||||
"qbittorrent-api",
|
||||
"route"
|
||||
],
|
||||
"contributes": {
|
||||
@@ -166,15 +104,7 @@
|
||||
}
|
||||
},
|
||||
"binds": {
|
||||
"route": "${dir:state}/route.json",
|
||||
"nzbget-api": "${dir:state}/nzbget-api.json",
|
||||
"qbittorrent-api": "${dir:state}/qbittorrent-api.json",
|
||||
"jackett-api": "${dir:state}/jackett-api.json"
|
||||
},
|
||||
"secrets": {
|
||||
"nzbget-api": "${dir:state}/nzbget-api.secret",
|
||||
"qbittorrent-api": "${dir:state}/qbittorrent-api.secret",
|
||||
"jackett-api": "${dir:state}/jackett-api.secret"
|
||||
"route": "/var/lib/mesh/radarr/route.json"
|
||||
},
|
||||
"build": {
|
||||
"on": [
|
||||
|
||||
@@ -4,11 +4,6 @@
|
||||
"description": "radarr — movie management. Its API client, tools and events live here (novox/hq ADR 0039).",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "tsc client.ts index.ts tools/index.ts downloads/settings.ts downloads/index.ts --module NodeNext --moduleResolution NodeNext --target ES2022 --outDir dist",
|
||||
"typecheck": "tsc -p tsconfig.json",
|
||||
"test": "node --test --experimental-strip-types 'test/*.test.ts'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@novox/mesh-sdk": "^0.1.0"
|
||||
},
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
"skipLibCheck": true,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["client.ts", "index.ts", "tools/index.ts", "downloads/settings.ts", "downloads/index.ts"]
|
||||
"include": ["client.ts", "index.ts", "tools/index.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user