Skip to content

Commit 8eaea02

Browse files
committed
fix: preserve jellyfin mode across startup and upgrade paths
1 parent 277fb8a commit 8eaea02

9 files changed

Lines changed: 40 additions & 9 deletions

File tree

.github/workflows/validate.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ jobs:
4141
run: |
4242
cp .env.example .env
4343
docker compose --profile autoupdate --profile music config >/dev/null
44+
docker compose --profile jellyfin config >/dev/null
45+
docker compose --profile autoupdate --profile music --profile jellyfin config >/dev/null
4446
rm .env

IMAGE_LOCK.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Tested lock snapshot:
2222
| kometa | `kometateam/kometa@sha256:46fc4bdd6f64dbd92655c6495d9f9d1a745845bd60fa13a7283755db48de8bc0` |
2323
| qbittorrent | `lscr.io/linuxserver/qbittorrent@sha256:065792d2b11f0facff340210fc1cf13623b029a94ecdf08b02d06d922205f618` |
2424
| seerr | `ghcr.io/seerr-team/seerr@sha256:1b5fc1ea825631d9d165364472663b817a4c58ef6aa1013f58d82c1570d7c866` |
25+
| jellyfin (optional) | `lscr.io/linuxserver/jellyfin@sha256:4ee07757abcaa0b74fbc74179392311dc2874c03b0bef04bc2d79e9e1a875793` |
2526
| tdarr | `ghcr.io/haveagitgat/tdarr@sha256:20a5656c4af4854e1877046294f77113f949d27e35940a9a65f231423d063207` |
2627
| tidarr (music profile) | `cstaelen/tidarr@sha256:79a2c62aed04dbe9770272443192eae145f26bdc2d188e665b13ab763341206c` |
2728

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ bash scripts/setup.sh # or: bash scripts/setup.sh --media-dir /Volume
158158
# edit .env with VPN keys
159159
bash scripts/doctor.sh # preflight validation before first boot
160160
docker compose up -d
161+
# if MEDIA_SERVER=jellyfin in .env:
162+
docker compose --profile jellyfin up -d
161163
docker compose --profile autoupdate up -d watchtower # optional auto-updates
162164
bash scripts/configure.sh
163165
bash scripts/install-launchd-jobs.sh

SETUP.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ bash scripts/vpn-mode.sh nord # switch to Nord
318318
**Restart everything:**
319319
```bash
320320
docker compose down && docker compose up -d
321+
# If using Jellyfin:
322+
docker compose down && docker compose --profile jellyfin up -d
321323
```
322324

323325
**Uninstall automation jobs:**

UPGRADE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ bash scripts/doctor.sh
6868
4. Start and configure:
6969
```bash
7070
docker compose up -d
71+
# If using Jellyfin:
72+
docker compose --profile jellyfin up -d
7173
bash scripts/configure.sh
7274
bash scripts/install-launchd-jobs.sh
7375
```
@@ -94,6 +96,8 @@ docker compose down
9496

9597
cd ~/mac-media-stack
9698
docker compose up -d
99+
# If your basic stack uses Jellyfin:
100+
docker compose --profile jellyfin up -d
97101
```
98102

99103
If you used the one-shot script, backup snapshots are saved under:

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ services:
227227
restart: unless-stopped
228228

229229
jellyfin:
230-
image: lscr.io/linuxserver/jellyfin:latest
230+
image: lscr.io/linuxserver/jellyfin@sha256:4ee07757abcaa0b74fbc74179392311dc2874c03b0bef04bc2d79e9e1a875793
231231
container_name: jellyfin
232232
profiles: ["jellyfin"]
233233
environment:

scripts/refresh-image-lock.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ COMPOSE_FILE="$SCRIPT_DIR/docker-compose.yml"
99
LOCK_FILE="$SCRIPT_DIR/IMAGE_LOCK.md"
1010
ENV_FILE="$SCRIPT_DIR/.env"
1111

12-
PROFILES=(autoupdate music)
13-
OPTIONAL_SERVICES=(watchtower)
12+
PROFILES=(autoupdate music jellyfin)
13+
OPTIONAL_SERVICES=(watchtower jellyfin)
1414
MUSIC_SERVICES=(lidarr tidarr)
1515

1616
for cmd in docker awk sed mktemp; do

scripts/setup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ echo ""
109109
echo "Next steps:"
110110
echo " 1. Edit .env and add your VPN keys"
111111
echo " 2. Run: docker compose up -d"
112+
echo " (or: docker compose --profile jellyfin up -d if MEDIA_SERVER=jellyfin)"
112113
echo " 3. Run: bash scripts/configure.sh"
113114
echo " 4. Edit config templates with your API keys (see SETUP.md)"
114115
echo ""

scripts/upgrade-from-basic.sh

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ copy_env_key_if_set "$BASIC_ENV" "$ADVANCED_ENV" "PUID"
213213
copy_env_key_if_set "$BASIC_ENV" "$ADVANCED_ENV" "PGID"
214214
copy_env_key_if_set "$BASIC_ENV" "$ADVANCED_ENV" "TIMEZONE"
215215
copy_env_key_if_set "$BASIC_ENV" "$ADVANCED_ENV" "SEERR_BIND_IP"
216+
copy_env_key_if_set "$BASIC_ENV" "$ADVANCED_ENV" "MEDIA_SERVER"
216217

217218
wg_priv="$(env_get "$BASIC_ENV" "WIREGUARD_PRIVATE_KEY")"
218219
wg_addr="$(env_get "$BASIC_ENV" "WIREGUARD_ADDRESSES")"
@@ -225,6 +226,12 @@ fi
225226
chmod 600 "$ADVANCED_ENV"
226227
log "Advanced .env updated from basic settings"
227228

229+
MEDIA_SERVER="$(env_get "$ADVANCED_ENV" "MEDIA_SERVER")"
230+
MEDIA_SERVER="${MEDIA_SERVER:-plex}"
231+
232+
BASIC_MEDIA_SERVER="$(env_get "$BASIC_ENV" "MEDIA_SERVER")"
233+
BASIC_MEDIA_SERVER="${BASIC_MEDIA_SERVER:-plex}"
234+
228235
info "Running advanced preflight checks"
229236
(cd "$ADVANCED_DIR" && bash scripts/doctor.sh --media-dir "$MEDIA_DIR")
230237

@@ -233,7 +240,11 @@ info "Stopping basic stack"
233240
log "Basic stack stopped"
234241

235242
info "Starting advanced stack"
236-
(cd "$ADVANCED_DIR" && docker compose up -d)
243+
if [[ "$MEDIA_SERVER" == "jellyfin" ]]; then
244+
(cd "$ADVANCED_DIR" && docker compose --profile jellyfin up -d)
245+
else
246+
(cd "$ADVANCED_DIR" && docker compose up -d)
247+
fi
237248
log "Advanced stack started"
238249

239250
info "Running auto-configuration"
@@ -269,12 +280,20 @@ echo ""
269280
echo "Backup path: $BACKUP_DIR"
270281
echo ""
271282
echo "Remaining manual steps:"
272-
echo " 1. Set Kometa keys in $MEDIA_DIR/config/kometa/config.yml"
273-
echo " - PLEX_TOKEN"
274-
echo " - TMDB API key"
275-
echo " 2. Configure Tdarr at http://localhost:8265"
283+
if [[ "$MEDIA_SERVER" == "plex" ]]; then
284+
echo " 1. Set Kometa keys in $MEDIA_DIR/config/kometa/config.yml"
285+
echo " - PLEX_TOKEN"
286+
echo " - TMDB API key"
287+
echo " 2. Configure Tdarr at http://localhost:8265"
288+
else
289+
echo " 1. Configure Tdarr at http://localhost:8265"
290+
fi
276291
echo ""
277292
echo "Rollback (if needed):"
278293
echo " cd $ADVANCED_DIR && docker compose down"
279-
echo " cd $BASIC_DIR && docker compose up -d"
294+
if [[ "$BASIC_MEDIA_SERVER" == "jellyfin" ]]; then
295+
echo " cd $BASIC_DIR && docker compose --profile jellyfin up -d"
296+
else
297+
echo " cd $BASIC_DIR && docker compose up -d"
298+
fi
280299
echo ""

0 commit comments

Comments
 (0)