mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-06-11 14:54:34 -04:00
I've added a plugin using the same architecture as the prowlarr plugin to enable Newznab as a source. I've tested locally with nzbhydra2 and it all seems to work as intended. I've added some unit tests for this feature, and found that a couple of other unit tests weren't behaving so fixed those up while I was at it. I also ran all of the linters in the makefile against it and fixed those up, too, so hopefully this should be as clean and as compatible as it can be.
201 lines
6.0 KiB
YAML
201 lines
6.0 KiB
YAML
# Test stack for download client development
|
|
# Includes shelfmark + all download clients on same network with shared volumes
|
|
#
|
|
# Usage:
|
|
# docker compose -f docker-compose.test-clients.yml up -d
|
|
# # Access shelfmark at http://localhost:8084
|
|
# # Configure clients in Settings > Prowlarr > Download Clients
|
|
#
|
|
# Web UIs:
|
|
# - shelfmark: http://localhost:8084
|
|
# - Prowlarr: http://localhost:9696 (no auth by default)
|
|
# - qBittorrent: http://localhost:8080 (check container logs for temp password)
|
|
# - Transmission: http://localhost:9091 (admin / admin)
|
|
# - Deluge: http://localhost:8112 (password: deluge)
|
|
# - NZBGet: http://localhost:6789 (nzbget / tegbzn6789)
|
|
# - NZBHydra: http://localhost:5076 (no auth by default)
|
|
# - SABnzbd: http://localhost:8085 (complete setup wizard for API key)
|
|
# - rTorrent: http://localhost:8000 (admin / admin - if auth enabled)
|
|
#
|
|
|
|
services:
|
|
shelfmark:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: shelfmark
|
|
container_name: test-shelfmark
|
|
cap_add:
|
|
- SYS_PTRACE
|
|
environment:
|
|
TZ: UTC
|
|
DEBUG: "true"
|
|
# All client configuration is done via Settings UI
|
|
# Use Docker service names for URLs:
|
|
# - qBittorrent: http://qbittorrent:8080
|
|
# - Transmission: http://transmission:9091
|
|
# - Deluge Web UI: http://deluge:8112
|
|
# - NZBGet: http://nzbget:6789
|
|
# - NZBHydra: http://nzbhydra:5076
|
|
# - SABnzbd: http://sabnzbd:8080
|
|
# - rTorrent: http://rtorrent:80 (XMLRPC via HTTP) or rtorrent (port 5000 for SCGI)
|
|
ports:
|
|
- "8084:8084"
|
|
volumes:
|
|
# Config and state
|
|
- ./.local/test-clients/shelfmark/config:/config
|
|
- ./.local/test-clients/shelfmark/log:/var/log/shelfmark
|
|
# Book destination directory (where completed books go)
|
|
- ./.local/test-clients/books:/books
|
|
# Staging directory
|
|
- ./.local/test-clients/tmp:/tmp/shelfmark
|
|
# CRITICAL: Mount client download directories so shelfmark can access completed files
|
|
- ./.local/test-clients/downloads:/downloads
|
|
# Mount source code for hot-reload (no rebuild needed for Python changes)
|
|
- ./shelfmark:/app/shelfmark:ro
|
|
# Mount tests for running pytest in container
|
|
- ./tests:/app/tests:ro
|
|
- ./pyproject.toml:/app/pyproject.toml:ro
|
|
- ./uv.lock:/app/uv.lock:ro
|
|
# Mount client configs for integration tests to read credentials
|
|
- ./.local/test-clients/qbittorrent/config:/qbittorrent-config:ro
|
|
- ./.local/test-clients/sabnzbd/config:/sabnzbd-config:ro
|
|
depends_on:
|
|
- nzbget
|
|
- nzbhydra
|
|
- sabnzbd
|
|
- qbittorrent
|
|
- transmission
|
|
- deluge
|
|
- rtorrent
|
|
restart: unless-stopped
|
|
|
|
prowlarr:
|
|
image: lscr.io/linuxserver/prowlarr:latest
|
|
container_name: test-prowlarr
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=UTC
|
|
volumes:
|
|
- ./.local/test-clients/prowlarr/config:/config
|
|
ports:
|
|
- "9696:9696"
|
|
restart: unless-stopped
|
|
|
|
nzbget:
|
|
image: lscr.io/linuxserver/nzbget:latest
|
|
container_name: test-nzbget
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=UTC
|
|
volumes:
|
|
- ./.local/test-clients/nzbget/config:/config
|
|
- ./.local/test-clients/downloads:/downloads
|
|
- ./.local/test-clients/nzbget/custom-cont-init.d:/custom-cont-init.d:ro
|
|
ports:
|
|
- "6789:6789" # Web UI / JSON-RPC
|
|
restart: unless-stopped
|
|
|
|
sabnzbd:
|
|
image: lscr.io/linuxserver/sabnzbd:latest
|
|
container_name: test-sabnzbd
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=UTC
|
|
volumes:
|
|
- ./.local/test-clients/sabnzbd/config:/config
|
|
- ./.local/test-clients/downloads:/downloads
|
|
ports:
|
|
- "8085:8080" # Web UI (external:internal)
|
|
restart: unless-stopped
|
|
|
|
qbittorrent:
|
|
image: lscr.io/linuxserver/qbittorrent:latest
|
|
container_name: test-qbittorrent
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=UTC
|
|
- WEBUI_PORT=8080
|
|
volumes:
|
|
- ./.local/test-clients/qbittorrent/config:/config
|
|
- ./.local/test-clients/downloads:/downloads
|
|
- ./.local/test-clients/qbittorrent/custom-cont-init.d:/custom-cont-init.d:ro
|
|
ports:
|
|
- "8080:8080" # Web UI / API
|
|
- "6882:6881"
|
|
- "6882:6881/udp"
|
|
restart: unless-stopped
|
|
|
|
transmission:
|
|
image: lscr.io/linuxserver/transmission:latest
|
|
container_name: test-transmission
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=UTC
|
|
- USER=admin
|
|
- PASS=admin
|
|
volumes:
|
|
- ./.local/test-clients/transmission/config:/config
|
|
- ./.local/test-clients/downloads:/downloads
|
|
ports:
|
|
- "9091:9091" # Web UI / RPC
|
|
- "51413:51413"
|
|
- "51413:51413/udp"
|
|
restart: unless-stopped
|
|
|
|
deluge:
|
|
image: lscr.io/linuxserver/deluge:latest
|
|
container_name: test-deluge
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=UTC
|
|
- DELUGE_LOGLEVEL=error
|
|
volumes:
|
|
- ./.local/test-clients/deluge/config:/config
|
|
- ./.local/test-clients/downloads:/downloads
|
|
ports:
|
|
- "8112:8112" # Web UI
|
|
- "58846:58846" # Daemon RPC
|
|
- "6881:6881"
|
|
- "6881:6881/udp"
|
|
restart: unless-stopped
|
|
|
|
rtorrent:
|
|
image: crazymax/rtorrent-rutorrent:latest # linuxserver has deprecated their rtorrent image
|
|
container_name: test-rtorrent
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=UTC
|
|
volumes:
|
|
- ./.local/test-clients/rtorrent/config:/config
|
|
- ./.local/test-clients/downloads:/downloads
|
|
ports:
|
|
- "8000:8000" # XMLRPC
|
|
- "8089:8080" # ruTorrent Web UI
|
|
- "9000:9000" # SCGI port
|
|
- "50000:50000" # Incoming connections
|
|
- "6881:6881/udp"
|
|
restart: unless-stopped
|
|
|
|
nzbhydra:
|
|
image: lscr.io/linuxserver/nzbhydra2:latest
|
|
container_name: nzbhydra
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=Europe/London
|
|
volumes:
|
|
- ./.local/test-clients/nzbhydra/config:/config
|
|
- ./.local/test-clients/downloads:/downloads
|
|
ports:
|
|
- 5076:5076
|
|
restart: unless-stopped
|
|
|