Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 26d399b8d5 | |||
| ac61265ea0 | |||
| 72290bbacd | |||
| 2001204e0b | |||
| 4a4965921f | |||
| c7409d0812 | |||
| 248027aaea | |||
| 0020ee2a58 |
+8
-27
@@ -24,44 +24,25 @@ steps:
|
||||
memory: 6Gi
|
||||
cpu: 4
|
||||
|
||||
# Stage the internal (Vault) CA into the shared workspace so the buildkit push
|
||||
# below can verify artifactapi's TLS cert. almalinux9-base already trusts the
|
||||
# unkin CA (it is the image the RPM release pipelines use to reach artifactapi
|
||||
# over HTTPS), so its consolidated trust bundle contains the chain we need.
|
||||
- name: ca-trust
|
||||
image: git.unkin.net/unkin/almalinux9-base:20260606
|
||||
commands:
|
||||
- cp /etc/pki/tls/certs/ca-bundle.crt "$${CI_WORKSPACE}/artifactapi-ca.crt"
|
||||
depends_on: [publish]
|
||||
backend_options:
|
||||
kubernetes:
|
||||
serviceAccountName: default
|
||||
resources:
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 250m
|
||||
limits:
|
||||
memory: 512Mi
|
||||
cpu: 1
|
||||
|
||||
# Build the runtime image and push it to the artifactapi local docker registry.
|
||||
# buildkit_config points buildkit at the staged CA so the TLS handshake with
|
||||
# artifactapi (Vault-signed cert) verifies; buildx copies the referenced CA
|
||||
# into the buildkitd container under /etc/buildkit/certs when it creates the
|
||||
# builder. CI_WORKSPACE is runtime-only so the path is the fixed workspace path.
|
||||
# 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
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/plugin-docker-buildx:latest
|
||||
settings:
|
||||
registry: artifactapi.k8s.syd1.au.unkin.net
|
||||
repo: artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha
|
||||
dockerfile: Dockerfile.runtime
|
||||
buildkit_config: |
|
||||
[registry."artifactapi.k8s.syd1.au.unkin.net"]
|
||||
ca = ["/woodpecker/src/git.unkin.net/unkin/jellyfin-ha/artifactapi-ca.crt"]
|
||||
ca = ["/etc/docker/certs.d/artifactapi.k8s.syd1.au.unkin.net/ca.crt"]
|
||||
tags:
|
||||
- ${CI_COMMIT_TAG}
|
||||
- latest
|
||||
depends_on: [ca-trust]
|
||||
depends_on: [publish]
|
||||
backend_options:
|
||||
kubernetes:
|
||||
serviceAccountName: default
|
||||
|
||||
+42
-5
@@ -21,8 +21,45 @@ RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends "jellyfin-web=10.11.6+deb12" \
|
||||
&& 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 (10.11.6):
|
||||
# LDAP Authentication 22.0.0.0 targetAbi 10.11.2.0 (v23 needs 10.11.9)
|
||||
# SSO Authentication 4.0.0.4 targetAbi 10.11.0.0
|
||||
# sha256 pins match each release's published .sha256 asset for reproducibility.
|
||||
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_22.0.0.0.zip
|
||||
ARG LDAP_SHA256=c2386c001be439c9946280a02d62610f29e325d4094e83bd31221de3f7aa20ae
|
||||
# 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).
|
||||
# SHA256 pins match each release's published asset for reproducibility and integrity.
|
||||
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_22.0.0.0"; \
|
||||
unzip -oq ldap.zip -d "LDAP Authentication_22.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 ─────────────────────────────────────────────────────────────
|
||||
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:10.0
|
||||
# .NET 9 runtime: matches the SDK 9.0 publish step (framework-dependent), so the
|
||||
# app's required Microsoft.NETCore.App 9.0 is present. Keep in lockstep with the
|
||||
# `mcr.microsoft.com/dotnet/sdk` major in .woodpecker/*.yaml and the Makefile.
|
||||
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:9.0
|
||||
|
||||
# FFmpeg and the native deps required by SkiaSharp and fontconfig.
|
||||
RUN apt-get update \
|
||||
@@ -39,6 +76,9 @@ WORKDIR /jellyfin
|
||||
COPY publish-output/ .
|
||||
# jellyfin-web client assets from the webclient stage.
|
||||
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
|
||||
EXPOSE 8096
|
||||
@@ -51,7 +91,4 @@ ENV JELLYFIN_DATA_DIR=/config \
|
||||
JELLYFIN_CACHE_DIR=/cache \
|
||||
JELLYFIN_LOG_DIR=/config/log
|
||||
|
||||
ENTRYPOINT ["./jellyfin", \
|
||||
"--datadir", "/config", \
|
||||
"--cachedir", "/cache", \
|
||||
"--webdir", "/jellyfin/jellyfin-web"]
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
|
||||
@@ -4,12 +4,12 @@ Build-orchestration repo for [ZoltyMat/jellyfin-ha](https://github.com/ZoltyMat/
|
||||
that adds distributed, Redis-backed transcoding for multi-pod Kubernetes (lease-aware cleanup, HA session
|
||||
takeover, optional PostgreSQL).
|
||||
|
||||
This repo does **not** vendor the fork's source. It pins an upstream commit, builds the .NET 10 server, and
|
||||
This repo does **not** vendor the fork's source. It pins an upstream commit, builds the .NET 9 server, and
|
||||
produces a runtime container image pushed to the Gitea registry.
|
||||
|
||||
## What it produces
|
||||
|
||||
`artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha:<tag>` — an `mcr.microsoft.com/dotnet/aspnet:10.0` based image with ffmpeg and
|
||||
`artifactapi.k8s.syd1.au.unkin.net/docker-internal/jellyfin-ha:<tag>` — an `mcr.microsoft.com/dotnet/aspnet:9.0` based image with ffmpeg and
|
||||
the prebuilt `jellyfin-web` client, running the published `jellyfin-ha` server.
|
||||
|
||||
## Layout
|
||||
@@ -34,7 +34,7 @@ the prebuilt `jellyfin-web` client, running the published `jellyfin-ha` server.
|
||||
make build # clones pinned upstream, dotnet publish, docker build
|
||||
```
|
||||
|
||||
Requires the .NET 10 SDK and Docker. `make publish` runs just the clone + publish into `./publish-output`.
|
||||
Requires the .NET 9 SDK and Docker. `make publish` runs just the clone + publish into `./publish-output`.
|
||||
|
||||
## Deployment
|
||||
|
||||
|
||||
@@ -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