Create Deployment wiki page for media-rip

xpltd_admin 2026-04-03 23:05:13 -06:00
parent 8388233e6b
commit 0fdd6ae9f6

88
Deployment.md Normal file

@ -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)