Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 64b6c01e91 | |||
| c8960dbe82 | |||
| 8631c39979 | |||
| f7ea7675cb | |||
| 2924cbb63d | |||
| 26d399b8d5 | |||
| ac61265ea0 | |||
| 72290bbacd | |||
| 2001204e0b | |||
| 4a4965921f | |||
| c7409d0812 | |||
| 248027aaea | |||
| 0020ee2a58 | |||
| b1470f3158 | |||
| ec04b35b39 | |||
| a369c49457 | |||
| 8738315c52 | |||
| ac507021f3 | |||
| 26e57c8655 | |||
| 9f8d9014d3 |
@@ -9,7 +9,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
REF=$$(cat UPSTREAM_REF)
|
REF=$$(cat UPSTREAM_REF)
|
||||||
git clone https://github.com/ZoltyMat/jellyfin-ha.git src
|
git clone https://git.unkin.net/unkin/jellyfin-ha-src.git src
|
||||||
git -C src checkout "$$REF"
|
git -C src checkout "$$REF"
|
||||||
dotnet publish src/Jellyfin.Server/Jellyfin.Server.csproj \
|
dotnet publish src/Jellyfin.Server/Jellyfin.Server.csproj \
|
||||||
-c Release -r linux-x64 --self-contained false -o ./publish-output
|
-c Release -r linux-x64 --self-contained false -o ./publish-output
|
||||||
@@ -26,7 +26,7 @@ steps:
|
|||||||
|
|
||||||
# Validate the runtime image builds (no push on PRs).
|
# Validate the runtime image builds (no push on PRs).
|
||||||
- name: docker-build
|
- name: docker-build
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/plugin-docker-buildx:latest
|
||||||
settings:
|
settings:
|
||||||
repo: artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha
|
repo: artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha
|
||||||
dockerfile: Dockerfile.runtime
|
dockerfile: Dockerfile.runtime
|
||||||
|
|||||||
+10
-2
@@ -9,7 +9,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
REF=$$(cat UPSTREAM_REF)
|
REF=$$(cat UPSTREAM_REF)
|
||||||
git clone https://github.com/ZoltyMat/jellyfin-ha.git src
|
git clone https://git.unkin.net/unkin/jellyfin-ha-src.git src
|
||||||
git -C src checkout "$$REF"
|
git -C src checkout "$$REF"
|
||||||
dotnet publish src/Jellyfin.Server/Jellyfin.Server.csproj \
|
dotnet publish src/Jellyfin.Server/Jellyfin.Server.csproj \
|
||||||
-c Release -r linux-x64 --self-contained false -o ./publish-output
|
-c Release -r linux-x64 --self-contained false -o ./publish-output
|
||||||
@@ -25,12 +25,20 @@ steps:
|
|||||||
cpu: 4
|
cpu: 4
|
||||||
|
|
||||||
# Build the runtime image and push it to the artifactapi local docker registry.
|
# Build the runtime image and push it to the artifactapi local docker registry.
|
||||||
|
# The plugin image bakes artifactapi's internal (Vault) CA at
|
||||||
|
# /etc/docker/certs.d/<registry>/ca.crt; buildkit_config points the buildx
|
||||||
|
# docker-container builder at that in-image CA. buildkitd runs in its own
|
||||||
|
# container and performs the push, so it needs the CA via --config even though
|
||||||
|
# the plugin image already trusts it — buildx copies the referenced file in.
|
||||||
- name: docker
|
- name: docker
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/plugin-docker-buildx:latest
|
||||||
settings:
|
settings:
|
||||||
registry: artifactapi.k8s.syd1.au.unkin.net
|
registry: artifactapi.k8s.syd1.au.unkin.net
|
||||||
repo: artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha
|
repo: artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha
|
||||||
dockerfile: Dockerfile.runtime
|
dockerfile: Dockerfile.runtime
|
||||||
|
buildkit_config: |
|
||||||
|
[registry."artifactapi.k8s.syd1.au.unkin.net"]
|
||||||
|
ca = ["/etc/docker/certs.d/artifactapi.k8s.syd1.au.unkin.net/ca.crt"]
|
||||||
tags:
|
tags:
|
||||||
- ${CI_COMMIT_TAG}
|
- ${CI_COMMIT_TAG}
|
||||||
- latest
|
- latest
|
||||||
|
|||||||
+41
-5
@@ -18,10 +18,46 @@ RUN apt-get update \
|
|||||||
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/jellyfin.gpg] https://repo.jellyfin.org/debian bookworm main" \
|
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/jellyfin.gpg] https://repo.jellyfin.org/debian bookworm main" \
|
||||||
> /etc/apt/sources.list.d/jellyfin.list \
|
> /etc/apt/sources.list.d/jellyfin.list \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends "jellyfin-web=10.11.6+deb12" \
|
&& apt-get install -y --no-install-recommends "jellyfin-web=12.0+deb12" \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# ── Plugin stage ──────────────────────────────────────────────────────────────
|
||||||
|
# Download and verify the auth plugins, unpacked into versioned dirs baked into
|
||||||
|
# the image and synced into /config/plugins at start (docker-entrypoint.sh).
|
||||||
|
# Versions are the newest each plugin publishes whose targetAbi <= the pinned
|
||||||
|
# Jellyfin server version (12.0.0):
|
||||||
|
# LDAP Authentication 24.0.0.0 targetAbi 12.0.0.0
|
||||||
|
# SSO Authentication 4.0.0.4 targetAbi 10.11.0.0 (newest release; loads on 12.0)
|
||||||
|
# sha256 pins make each fetch reproducible.
|
||||||
|
FROM --platform=linux/amd64 debian:bookworm-slim AS plugins
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends curl ca-certificates unzip \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ARG LDAP_URL=http://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/jellyfin/files/plugin/ldap-authentication/ldap-authentication_24.0.0.0.zip
|
||||||
|
ARG LDAP_SHA256=3be1f9d6a6ce9ea375e556dd30136d178a8dbe35cbe866d30d3451dc3ff7e804
|
||||||
|
# LDAP is served through artifactapi remote. SSO is served through the artifactapi
|
||||||
|
# github proxy, which the CI build network can reach (github is not directly reachable).
|
||||||
|
ARG SSO_URL=http://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/9p4/jellyfin-plugin-sso/releases/download/v4.0.0.4/sso-authentication_4.0.0.4.zip
|
||||||
|
ARG SSO_SHA256=c09f16ba31059a434ddd7f811e4f9608d4b4c4514cc80a5bf1ca33bee61e1107
|
||||||
|
|
||||||
|
WORKDIR /plugins
|
||||||
|
RUN set -eu; \
|
||||||
|
curl -fsSL "$LDAP_URL" -o ldap.zip; \
|
||||||
|
echo "$LDAP_SHA256 ldap.zip" | sha256sum -c -; \
|
||||||
|
mkdir -p "LDAP Authentication_24.0.0.0"; \
|
||||||
|
unzip -oq ldap.zip -d "LDAP Authentication_24.0.0.0"; \
|
||||||
|
curl -fsSL "$SSO_URL" -o sso.zip; \
|
||||||
|
echo "$SSO_SHA256 sso.zip" | sha256sum -c -; \
|
||||||
|
mkdir -p "SSO Authentication_4.0.0.4"; \
|
||||||
|
unzip -oq sso.zip -d "SSO Authentication_4.0.0.4"; \
|
||||||
|
rm -f ldap.zip sso.zip
|
||||||
|
|
||||||
# ── Runtime stage ─────────────────────────────────────────────────────────────
|
# ── Runtime stage ─────────────────────────────────────────────────────────────
|
||||||
|
# .NET 10 runtime: matches the SDK 10.0 publish step (framework-dependent) and the
|
||||||
|
# fork's net10.0 TFM, so the app's required Microsoft.NETCore.App 10.0 is present.
|
||||||
|
# Keep in lockstep with the `mcr.microsoft.com/dotnet/sdk` major in .woodpecker/*.yaml.
|
||||||
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:10.0
|
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:10.0
|
||||||
|
|
||||||
# FFmpeg and the native deps required by SkiaSharp and fontconfig.
|
# FFmpeg and the native deps required by SkiaSharp and fontconfig.
|
||||||
@@ -39,6 +75,9 @@ WORKDIR /jellyfin
|
|||||||
COPY publish-output/ .
|
COPY publish-output/ .
|
||||||
# jellyfin-web client assets from the webclient stage.
|
# jellyfin-web client assets from the webclient stage.
|
||||||
COPY --from=webclient /usr/share/jellyfin/web ./jellyfin-web/
|
COPY --from=webclient /usr/share/jellyfin/web ./jellyfin-web/
|
||||||
|
# Baked auth plugins; docker-entrypoint.sh syncs these into /config/plugins.
|
||||||
|
COPY --from=plugins /plugins /usr/share/jellyfin/plugins-baked
|
||||||
|
COPY --chmod=0755 docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
# Jellyfin default ports
|
# Jellyfin default ports
|
||||||
EXPOSE 8096
|
EXPOSE 8096
|
||||||
@@ -51,7 +90,4 @@ ENV JELLYFIN_DATA_DIR=/config \
|
|||||||
JELLYFIN_CACHE_DIR=/cache \
|
JELLYFIN_CACHE_DIR=/cache \
|
||||||
JELLYFIN_LOG_DIR=/config/log
|
JELLYFIN_LOG_DIR=/config/log
|
||||||
|
|
||||||
ENTRYPOINT ["./jellyfin", \
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||||
"--datadir", "/config", \
|
|
||||||
"--cachedir", "/cache", \
|
|
||||||
"--webdir", "/jellyfin/jellyfin-web"]
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ REF := $(shell cat UPSTREAM_REF)
|
|||||||
# ./publish-output (consumed by Dockerfile.runtime). Mirrors CI.
|
# ./publish-output (consumed by Dockerfile.runtime). Mirrors CI.
|
||||||
publish:
|
publish:
|
||||||
rm -rf src publish-output
|
rm -rf src publish-output
|
||||||
git clone https://github.com/ZoltyMat/jellyfin-ha.git src
|
git clone https://git.unkin.net/unkin/jellyfin-ha-src.git src
|
||||||
git -C src checkout $(REF)
|
git -C src checkout $(REF)
|
||||||
dotnet publish src/Jellyfin.Server/Jellyfin.Server.csproj \
|
dotnet publish src/Jellyfin.Server/Jellyfin.Server.csproj \
|
||||||
-c Release -r linux-x64 --self-contained false -o ./publish-output
|
-c Release -r linux-x64 --self-contained false -o ./publish-output
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
d4f9c12c22d3a640f3b0a3622b23b8cd01d044ad
|
10fed9409db4d65a101bdcbadaf86c8f2180a901
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Sync image-baked plugins into the /config (datadir) plugins directory on every
|
||||||
|
# start. /config is a PVC that overlays the image, so plugins baked into the
|
||||||
|
# image are invisible until copied in here. Removing any existing versioned dir
|
||||||
|
# of the same plugin first lets the image version win across restarts/downgrades.
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
BAKED_DIR=/usr/share/jellyfin/plugins-baked
|
||||||
|
PLUGIN_DIR=/config/plugins
|
||||||
|
|
||||||
|
if [ -d "$BAKED_DIR" ]; then
|
||||||
|
mkdir -p "$PLUGIN_DIR"
|
||||||
|
for src in "$BAKED_DIR"/*; do
|
||||||
|
[ -d "$src" ] || continue
|
||||||
|
name=$(basename "$src") # e.g. "LDAP Authentication_22.0.0.0"
|
||||||
|
base=${name%_*} # plugin name without the trailing _<version>
|
||||||
|
for existing in "$PLUGIN_DIR/$base"_*; do
|
||||||
|
[ -e "$existing" ] && rm -rf "$existing"
|
||||||
|
done
|
||||||
|
rm -rf "$PLUGIN_DIR/$name"
|
||||||
|
cp -a "$src" "$PLUGIN_DIR/$name"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec ./jellyfin \
|
||||||
|
--datadir /config \
|
||||||
|
--cachedir /cache \
|
||||||
|
--webdir /jellyfin/jellyfin-web \
|
||||||
|
"$@"
|
||||||
Reference in New Issue
Block a user