From a3dbe8b6c0c679f0a7034ef83448137ef18aa996 Mon Sep 17 00:00:00 2001 From: Gronod Date: Fri, 15 May 2026 16:50:50 +0100 Subject: [PATCH] docs: add Docker deployment instructions and OCI labels - Add LABEL tags to Dockerfile (OCI standard + custom.hardware.requirement) - Add dynamic version/created labels in CI workflow - Add Docker deployment section to README with docker run, compose, and update instructions - Registry pull source: docker.i3omb.com/sofarr --- .gitea/workflows/build-image.yml | 3 ++ Dockerfile | 9 ++++ README.md | 73 ++++++++++++++++++++++++++++++-- 3 files changed, 81 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build-image.yml b/.gitea/workflows/build-image.yml index 5abfe94..9f58d86 100644 --- a/.gitea/workflows/build-image.yml +++ b/.gitea/workflows/build-image.yml @@ -31,3 +31,6 @@ jobs: reg.i3omb.com/sofarr:${{ steps.version.outputs.version }} reg.i3omb.com/sofarr:${{ steps.version.outputs.release }} reg.i3omb.com/sofarr:latest + labels: | + org.opencontainers.image.version=${{ steps.version.outputs.version }} + org.opencontainers.image.created=${{ github.event.head_commit.timestamp }} diff --git a/Dockerfile b/Dockerfile index 3e3a2da..87f7a89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,14 @@ FROM node:18-alpine +LABEL org.opencontainers.image.title="sofarr" +LABEL org.opencontainers.image.description="Personal media download dashboard for *arr services" +LABEL org.opencontainers.image.authors="Gordon Bolton" +LABEL org.opencontainers.image.source="https://git.i3omb.com/Gandalf/sofarr" +LABEL org.opencontainers.image.url="https://docker.i3omb.com" +LABEL org.opencontainers.image.vendor="Gordon Bolton" +LABEL org.opencontainers.image.licenses="MIT" +LABEL custom.hardware.requirement="None - runs on any Docker-supported platform including ARM and x86_64" + WORKDIR /app # Copy package files and install dependencies diff --git a/README.md b/README.md index 792c626..3bd220c 100644 --- a/README.md +++ b/README.md @@ -51,18 +51,83 @@ SONARR_INSTANCES=[{"name":"main","url":"...","apiKey":"..."}] ## Prerequisites -- Node.js (v12 or higher) -- npm +- **Docker** (recommended), or Node.js (v12+) for manual installation - At least one of: SABnzbd or qBittorrent - Sonarr (optional, for TV tracking) - Radarr (optional, for movie tracking) - Emby (for user authentication) -## Installation +## Docker Deployment (Recommended) + +### Quick Start + +```bash +docker run -d \ + --name sofarr \ + --restart unless-stopped \ + -p 3001:3001 \ + -v /path/to/your/.env:/app/.env \ + docker.i3omb.com/sofarr:latest +``` + +### Step-by-Step + +1. **Create your environment file**: +```bash +mkdir -p /opt/sofarr +curl -o /opt/sofarr/.env https://git.i3omb.com/Gandalf/sofarr/raw/branch/main/.env.sample +# Edit /opt/sofarr/.env with your service details +nano /opt/sofarr/.env +``` + +2. **Run the container**: +```bash +docker run -d \ + --name sofarr \ + --restart unless-stopped \ + -p 3001:3001 \ + -v /opt/sofarr/.env:/app/.env \ + docker.i3omb.com/sofarr:latest +``` + +3. **Access the dashboard** at `http://your-server:3001` + +### Docker Compose + +```yaml +version: "3" +services: + sofarr: + image: docker.i3omb.com/sofarr:latest + container_name: sofarr + restart: unless-stopped + ports: + - "3001:3001" + volumes: + - /opt/sofarr/.env:/app/.env +``` + +### Available Tags + +| Tag | Description | +|-----|-------------| +| `latest` | Latest stable release | +| `0.1` | Latest patch for the 0.1.x release line | +| `0.1.0` | Specific version | + +### Updating + +```bash +docker pull docker.i3omb.com/sofarr:latest +docker rm -f sofarr +# Re-run the docker run command above +``` + +## Manual Installation 1. **Clone and install**: ```bash -git clone +git clone https://git.i3omb.com/Gandalf/sofarr.git cd sofarr npm install ```