From d3b7ac59fdcceeaf0127bee95f852061fef13824 Mon Sep 17 00:00:00 2001 From: Nick Yeoman Date: Thu, 2 Jul 2026 21:08:11 -0700 Subject: [PATCH] feat: add lidarr_dev stack and update README templates --- AGENTS.md | 29 ++++---------- _docs/template-readme.md | 15 +++++++ lidarr_dev/README.md | 84 ++++++++++++++++++++++++++++++++++++++++ lidarr_dev/compose.yaml | 20 ++++++++++ lidarr_dev/sample.env | 4 ++ 5 files changed, 131 insertions(+), 21 deletions(-) create mode 100644 lidarr_dev/README.md create mode 100644 lidarr_dev/compose.yaml create mode 100644 lidarr_dev/sample.env diff --git a/AGENTS.md b/AGENTS.md index 99f7489..0e45c66 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,36 +2,23 @@ ## Stack conventions -- Every stack has exactly 3 files: `compose.yaml` (or `docker-compose.yml`), `sample.env`, `README.md` +- Every stack has at least 3 files: `compose.yaml` (dockhand style), `sample.env`, `README.md` - `_dev` = experimental, `_notes` = docs/minimal examples, no suffix = production-ready - Always references an external `proxy` network (`docker network create proxy` once) - Volumes use `${VOL_PATH:-/data}` as the base path -- Timezone defaults to `America/Vancouver` +- Timezone defaults to `America/Vancouver`, but only include if the container requires it. - Restart policy, image tag, and port are configurable via env vars with sensible defaults -- `deploy.bash` at root emulates Dockhand CLI for local testing (uses `fzf`) - New stacks: copy from `_docs/template-compose.md` and `_docs/template-readme.md` - Compose section order: `image` → `restart` → `volumes` → `environment` → `ports` → `networks` → `depends_on` → `healthcheck` → `labels` → `command` → `user` - -## Test a single stack - -```sh -# From the stack directory: -docker compose --env-file sample.env up -d -``` - -Note: `deploy.bash` only looks for `compose.yaml`, not `docker-compose.yml`. - -## Environment loading - -`--env-file` supports multiple files, applied in order (last wins): -```sh -docker compose --env-file sample.env --env-file /data/test.env up -d +- README section order: `Overview` → `Getting Started` → `Docker Run` → `Project Details` → `Environment Variable Notes` → `Volume Notes` → `Network Notes` → `Additional Notes / Gotchas` → `Dockhand Stack, Deploy from Git` +- Every compose file must declare the external `proxy` network at the root level: + ```yaml +networks: + proxy: + external: true ``` ## No CI/CD, no dependency management This is a Docker Compose file collection, not a code project. No tests, no build tools, no lockfiles. -## OpenCode - -The `opencode/` stack runs OpenCode with a local ollama backend. Config is at `opencode/config/config.json`. Requires `ollama/` stack to be running and `OPENCODE_SERVER_PASSWORD` to be set. diff --git a/_docs/template-readme.md b/_docs/template-readme.md index c7c247d..78bef22 100644 --- a/_docs/template-readme.md +++ b/_docs/template-readme.md @@ -5,6 +5,21 @@ A short 1--3 sentence description of what this Docker Compose project does. +## Getting Started + +1. Start the container: `docker compose up -d` +2. Open http://localhost:[PORT] in your browser +3. Follow the initial setup wizard to configure the application + +## Docker Run + +```bash +docker run -d \ + --name=[SERVICE_NAME] \ + # ...env vars, ports, volumes... + [IMAGE_NAME] +``` + ## Project Details - **Project Repository:** [Link](https://example.com) diff --git a/lidarr_dev/README.md b/lidarr_dev/README.md new file mode 100644 index 0000000..0cbcd3b --- /dev/null +++ b/lidarr_dev/README.md @@ -0,0 +1,84 @@ +# Lidarr + +## Overview + +Lidarr is a music collection manager for Usenet and BitTorrent users. It automatically monitors specified artists, searches for new releases (or upgrades to existing tracks), and sends them to your download client. After download, Lidarr renames and organizes the files into your music library and can notify your media server of the new content. + +## Getting Started + +Open http://localhost:8686 in your browser and complete the initial setup wizard: + +1. **Choose your UI language** +2. **Add a download client** — select qBittorrent, enter its host/port/credentials +3. **Add an indexer** — or connect to Prowlarr for automatic indexer sync + +Once the wizard finishes, Lidarr displays **"No artists found"**. To populate your library: + +- Go to **Settings → Media Management** and add a **Root Folder** (e.g., `/music`) — this is where your organized music library will live +- Click **Add an artist** and search by name — Lidarr fetches metadata, discography, and album art +- Lidarr cross-references your Root Folder for any existing files and matches them to the artist's catalog + +### Download flow + +qBittorrent downloads to its own directory → Lidarr picks it up, renames/tags the files, and moves them into `/Artist Name/Album/` + +### Spotify playlist import + +Lidarr doesn't natively import Spotify playlists. Use a community tool like [SpotifyToLidarr](https://github.com/Claudemirovsky/SpotifyToLidarr) or set up a **List** (Settings → Lists) from Last.fm or MusicBrainz to auto-add artists based on your listening habits. + +## Docker Run + +```bash +docker run -d \ + --name=lidarr \ + -e PUID=1000 \ + -e PGID=1000 \ + -e UMASK=002 \ + -e TZ=America/Vancouver \ + -p 8686:8686 \ + -v ${VOL_PATH:-./data}/lidarr/config:/config \ + -v ${VOL_PATH:-./data}/lidarr/data:/data \ + --network proxy \ + --restart unless-stopped \ + ghcr.io/hotio/lidarr:release +``` + +## Project Details + +- **Project Repository:** [https://lidarr.audio/](https://lidarr.audio/) +- **Container Image:** [ghcr.io/hotio/lidarr](https://hotio.dev/containers/lidarr/) +- **Reverse Proxy Port:** `8686` + +## Environment Variable Notes + +| Variable | Description | +|---|---| +| `LIDARR_IMAGE` | Container image (default: `ghcr.io/hotio/lidarr:release`) | +| `LIDARR_RESTART` | Restart policy (default: `unless-stopped`) | +| `LIDARR_PORT` | Published port for the web UI (default: `8686`) | +| `VOL_PATH` | Base path for persistent data volumes (default: `./data`) | +| `TZ` | Container timezone (default: `America/Vancouver`) | + +## Volume Notes + +| Volume | Purpose | +|---|---| +| `${VOL_PATH}/lidarr/config` | Application configuration and database | +| `${VOL_PATH}/lidarr/data` | Download client data and working directory | + +## Network Notes + +Requires an external `proxy` network. Create it once with: + +```bash +docker network create proxy +``` + +## Dockhand Stack, Deploy from Git + +- **Cookbooks Repository** +- **stackname:** lidarr_dev +- **Compose file path:** lidarr_dev/compose.yaml +- **Additional env file (optional):** lidarr_dev/sample.env + +Load `lidarr_dev/sample.env` into the Environment variables in Dockhand, then create the Stack. diff --git a/lidarr_dev/compose.yaml b/lidarr_dev/compose.yaml new file mode 100644 index 0000000..739145f --- /dev/null +++ b/lidarr_dev/compose.yaml @@ -0,0 +1,20 @@ +services: + lidarr: + image: ${LIDARR_IMAGE:-ghcr.io/hotio/lidarr:release} + restart: ${LIDARR_RESTART:-unless-stopped} + volumes: + - ${VOL_PATH:-./data}/lidarr/config:/config + - ${VOL_PATH:-./data}/lidarr/data:/data + environment: + - PUID=1000 + - PGID=1000 + - UMASK=002 + - TZ=${TZ:-America/Vancouver} + ports: + - "${LIDARR_PORT:-8686}:8686" + networks: + - proxy + +networks: + proxy: + external: true diff --git a/lidarr_dev/sample.env b/lidarr_dev/sample.env new file mode 100644 index 0000000..d88e8ff --- /dev/null +++ b/lidarr_dev/sample.env @@ -0,0 +1,4 @@ +# Lidarr +VOL_PATH=./data +LIDARR_IMAGE=ghcr.io/hotio/lidarr:release +TZ="America/Vancouver"