From 0fdd6ae9f658036e3487ec4130167ef88b3bcb5a Mon Sep 17 00:00:00 2001 From: xpltd_admin Date: Fri, 3 Apr 2026 23:05:13 -0600 Subject: [PATCH] Create Deployment wiki page for media-rip --- Deployment.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Deployment.md diff --git a/Deployment.md b/Deployment.md new file mode 100644 index 0000000..d450052 --- /dev/null +++ b/Deployment.md @@ -0,0 +1,88 @@ +# Deployment + +| Meta | Value | +|------|-------| +| **Repo** | `xpltdco/media-rip` | +| **Page** | `Deployment` | +| **Audience** | developers, agents, newcomers | +| **Last Updated** | 2026-04-04 | +| **Status** | current | + +## Docker Image + +3-stage multi-arch build (amd64 + arm64). Published to `ghcr.io/xpltdco/media-rip`. + +| Stage | Base | Purpose | +|-------|------|---------| +| 1 | node:22-slim | Build Vue 3 frontend | +| 2 | python:3.12-slim | Install Python dependencies | +| 3 | python:3.12-slim | Runtime with yt-dlp, ffmpeg, deno | + +Runtime runs as non-root user `mediarip`. SUID/SGID bits stripped. + +## Volumes + +| Mount | Container Path | Purpose | +|-------|---------------|---------| +| Bind or named | `/downloads` | Downloaded media files | +| Named volume | `/data` | SQLite DB, session data, error logs | +| Optional bind | `/themes` | Custom theme CSS files | +| Optional bind | `/app/config.yaml` | YAML configuration override | + +## Docker Compose + +```yaml +services: + mediarip: + image: ghcr.io/xpltdco/media-rip:latest + ports: ["8080:8000"] + volumes: + - ./downloads:/downloads + - mediarip-data:/data + restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"] + interval: 30s + timeout: 5s + retries: 3 +``` + +## Secure Deployment (Caddy) + +For public-facing deployments with auto-TLS: + +```yaml +services: + media-rip: + image: ghcr.io/xpltdco/media-rip:latest + expose: ["8000"] + environment: + - MEDIARIP__ADMIN__PASSWORD=${ADMIN_PASSWORD} + caddy: + image: caddy:2-alpine + ports: ["80:80", "443:443"] + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile:ro + depends_on: + media-rip: {condition: service_healthy} +``` + +**Caddyfile:** +``` +your-domain.com { + reverse_proxy media-rip:8000 +} +``` + +## xpltd Infrastructure + +Traffic flow: `Client → Cloudflare → nginx01:443 → ub01:8080 → container:8000` + +## Health Check + +`GET /api/health` returns status, version, yt-dlp version, uptime, and queue depth. Used by Docker healthcheck and monitoring. + +## Backup + +- **Critical:** `/data` volume (SQLite database) +- **Optional:** `/downloads` (re-downloadable media) \ No newline at end of file