From 51456faff438ea872ad429ef9984423ecff012fc Mon Sep 17 00:00:00 2001 From: J0Z1L Date: Sat, 28 Feb 2026 00:54:00 +0100 Subject: [PATCH] Default Unraid template image to Forgejo registry with optional auto-push --- .env.example | 7 +++++++ README.md | 16 ++++++++++++++++ scripts/run-unraid.sh | 18 ++++++++++++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 381a9a3..e387c1b 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,12 @@ PORT=3000 +IMAGE_REPO=forgejo.tailef61c0.ts.net/openclaw/lidarr-spotify-frontend +IMAGE_TAG=latest +PUSH_IMAGE=0 +REGISTRY_URL=forgejo.tailef61c0.ts.net +REGISTRY_USER= +REGISTRY_TOKEN= + SPOTIFY_CLIENT_ID=deine_spotify_client_id SPOTIFY_CLIENT_SECRET=dein_spotify_client_secret YOUTUBE_API_KEY= diff --git a/README.md b/README.md index f322e6b..bc124eb 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,22 @@ Danach macht das Skript automatisch: - Unraid-Template erstellen/aktualisieren - Template-Seite in Unraid oeffnen +Standard-Image-Repo ist jetzt Forgejo Registry: + +```bash +IMAGE_REPO=forgejo.tailef61c0.ts.net/openclaw/lidarr-spotify-frontend +IMAGE_TAG=latest +``` + +Optional direkt in Registry pushen: + +```bash +PUSH_IMAGE=1 +REGISTRY_URL=forgejo.tailef61c0.ts.net +REGISTRY_USER=openclaw +REGISTRY_TOKEN=dein_token +``` + Alternativ (wenn du schon im Repo bist), einmalig: ```bash diff --git a/scripts/run-unraid.sh b/scripts/run-unraid.sh index 1117439..2625c0a 100755 --- a/scripts/run-unraid.sh +++ b/scripts/run-unraid.sh @@ -9,9 +9,13 @@ TEMPLATE_NAME="${TEMPLATE_NAME:-my-lidarr-spotify-frontend.xml}" TEMPLATE_PATH="${TEMPLATE_DIR}/${TEMPLATE_NAME}" CONTAINER_NAME="${CONTAINER_NAME:-lidarr-spotify-frontend}" -IMAGE_REPO="${IMAGE_REPO:-local/lidarr-spotify-frontend}" +IMAGE_REPO="${IMAGE_REPO:-forgejo.tailef61c0.ts.net/openclaw/lidarr-spotify-frontend}" IMAGE_TAG="${IMAGE_TAG:-latest}" IMAGE="${IMAGE_REPO}:${IMAGE_TAG}" +PUSH_IMAGE="${PUSH_IMAGE:-0}" +REGISTRY_URL="${REGISTRY_URL:-forgejo.tailef61c0.ts.net}" +REGISTRY_USER="${REGISTRY_USER:-}" +REGISTRY_TOKEN="${REGISTRY_TOKEN:-}" HOST_PORT="${HOST_PORT:-3000}" APPDATA_PATH="${APPDATA_PATH:-/mnt/user/appdata/lidarr-spotify-frontend}" MUSIC_PATH="${MUSIC_PATH:-/mnt/user/music}" @@ -57,6 +61,16 @@ fi echo "==> Build image ${IMAGE}" docker build -t "${IMAGE}" "${PROJECT_ROOT}" +if [[ "${PUSH_IMAGE}" == "1" ]]; then + if [[ -n "${REGISTRY_USER}" && -n "${REGISTRY_TOKEN}" ]]; then + echo "==> Login registry ${REGISTRY_URL} als ${REGISTRY_USER}" + echo "${REGISTRY_TOKEN}" | docker login "${REGISTRY_URL}" --username "${REGISTRY_USER}" --password-stdin + fi + + echo "==> Push image ${IMAGE}" + docker push "${IMAGE}" +fi + mkdir -p "${TEMPLATE_DIR}" TMP_TEMPLATE="$(mktemp)" trap 'rm -f "${TMP_TEMPLATE}"' EXIT @@ -66,7 +80,7 @@ cat > "${TMP_TEMPLATE}" < ${CONTAINER_NAME} ${IMAGE} - https://hub.docker.com/ + https://${REGISTRY_URL}/ bridge sh