Compare commits

..

2 Commits
main ... main

Author SHA1 Message Date
ef7397f0ba Merge pull request 'Add healthcheck, backup support, and update documentation' (#5) from yaup/jellyfin:pr/healthcheck-backup-improvements-v2 into main
Reviewed-on: coop-cloud/jellyfin#5
Reviewed-by: ammaratef45 <ammaratef45@proton.me>
2026-01-22 01:11:37 +00:00
cde0595c77 Add healthcheck and backup support
- Enable healthcheck using Jellyfin's /health endpoint
- Add backup-bot-two for backups
- Expand .env.sample with backup configuration options
2026-01-21 13:53:38 -05:00
4 changed files with 26 additions and 100 deletions

View File

@ -6,7 +6,6 @@ TYPE=jellyfin
DOMAIN=jellyfin.example.com
# Compose Files
# Add compose.backup.yml for automated backups
# Add compose.media_volumes.yml for Sonarr/Radarr integration
COMPOSE_FILE="compose.yml"
@ -27,25 +26,7 @@ EXTRA_VOLUME=/dev/null:/tmp/.dummy
# movies_volume=radarr_media
# shows_volume=sonarr_media
# Backup Configuration (use with compose.backup.yml)
# ==================================================
# Backup schedule (cron expression, default: 2 AM daily)
# BACKUP_CRON=0 2 * * *
# Number of days to retain backups
# BACKUP_RETENTION_DAYS=7
# Local backup storage path
# BACKUP_LOCAL_PATH=/path/to/backups
# S3-compatible storage (optional)
# AWS_S3_BUCKET_NAME=your-bucket
# AWS_ACCESS_KEY_ID=your-key-id
# AWS_SECRET_ACCESS_KEY=your-secret
# AWS_S3_PATH=jellyfin
# AWS_ENDPOINT=https://s3.example.com
# SSH/SFTP storage (optional)
# SSH_HOST_NAME=backup.example.com
# SSH_USER=backup
# SSH_REMOTE_PATH=/backups/jellyfin
# Backup Configuration
# ====================
# Enable/disable backups (uses backup-bot-two or abra)
# ENABLE_BACKUPS=true

View File

@ -2,13 +2,15 @@
> The Free Software Media System
| Property | Value |
| --- | --- |
| **Category** | Apps |
| **Status** | 3, Beta |
| **Image** | [`jellyfin/jellyfin`](https://hub.docker.com/r/jellyfin/jellyfin) |
| **Healthcheck** | Yes |
| **Backups** | Yes |
<!-- metadata -->
* **Category**: Apps
* **Status**: 3, Beta
* **Image**: [`jellyfin/jellyfin`](https://hub.docker.com/r/jellyfin/jellyfin), 4, upstream
* **Healthcheck**: Yes
* **Backups**: Yes
<!-- endmetadata -->
Jellyfin is a free and open-source media server that lets you collect, manage, and stream your media. This recipe deploys Jellyfin with Traefik integration, health monitoring, and optional automated backups.
@ -43,37 +45,24 @@ During Jellyfin's initial setup wizard, add your mounted paths as media librarie
### Backup Configuration
To enable automated backups, add `compose.backup.yml` to your `COMPOSE_FILE`:
This recipe supports automated backups using [backup-bot-two](https://git.coopcloud.tech/coop-cloud/backup-bot-two) or `abra` backup commands.
#### Enabling Backups
Backups are enabled by default. To disable them, set:
```bash
COMPOSE_FILE="compose.yml:compose.backup.yml"
ENABLE_BACKUPS=false
```
Configure backup storage in your environment:
#### What Gets Backed Up
| Variable | Description | Default |
| --- | --- | --- |
| `BACKUP_CRON` | Backup schedule (cron) | `0 2 * * *` (2 AM daily) |
| `BACKUP_RETENTION_DAYS` | Days to keep backups | `7` |
| `BACKUP_LOCAL_PATH` | Local backup directory | `/tmp/jellyfin-backups` |
* **Config volume** (`/config`): Jellyfin configuration, databases, metadata, and plugins
* **Cache volume**: Excluded (transcoding cache, not needed in backups)
#### S3-Compatible Storage
#### What's Not Backed Up
```bash
AWS_S3_BUCKET_NAME=your-bucket
AWS_ACCESS_KEY_ID=your-key-id
AWS_SECRET_ACCESS_KEY=your-secret
AWS_S3_PATH=jellyfin
AWS_ENDPOINT=https://s3.example.com # For non-AWS S3
```
#### SSH/SFTP Storage
```bash
SSH_HOST_NAME=backup.example.com
SSH_USER=backup
SSH_REMOTE_PATH=/backups/jellyfin
```
Media files are not included in backups. Back up your media library separately or ensure you can re-download content if needed.
## Integration with Media Stack

View File

@ -1,41 +0,0 @@
---
services:
backup:
image: offen/docker-volume-backup:v2
environment:
- BACKUP_CRON_EXPRESSION=${BACKUP_CRON:-0 2 * * *}
- BACKUP_FILENAME=jellyfin-backup-%Y-%m-%dT%H-%M-%S.tar.gz
- BACKUP_PRUNING_PREFIX=jellyfin-backup-
- BACKUP_RETENTION_DAYS=${BACKUP_RETENTION_DAYS:-7}
- BACKUP_STOP_DURING_BACKUP_LABEL=jellyfin-backup
# Optional: S3-compatible storage
- AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME:-}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-}
- AWS_S3_PATH=${AWS_S3_PATH:-}
- AWS_ENDPOINT=${AWS_ENDPOINT:-}
# Optional: SSH/SFTP storage
- SSH_HOST_NAME=${SSH_HOST_NAME:-}
- SSH_USER=${SSH_USER:-}
- SSH_REMOTE_PATH=${SSH_REMOTE_PATH:-}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- config:/backup/config:ro
- ${BACKUP_LOCAL_PATH:-/tmp/jellyfin-backups}:/archive
networks:
- proxy
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=false"
app:
deploy:
labels:
- "docker-volume-backup.stop-during-backup=jellyfin-backup"
volumes:
config:
external: true
name: ${STACK_NAME}_config

View File

@ -21,6 +21,8 @@ services:
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV:-production}"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8096"
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
- "backupbot.backup.volumes.cache=false"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8096/health"]
interval: 30s
@ -35,8 +37,3 @@ volumes:
networks:
proxy:
external: true
# coop-cloud recipe metadata
# LABEL version="0.6.0+10.11.1"
# LABEL healthcheck="true"
# LABEL backups="true"