From 45673bb066f0f9d6aefb9b309d3d23cb4a44266c Mon Sep 17 00:00:00 2001 From: Gulum Date: Sun, 19 Jul 2026 09:25:26 +0200 Subject: [PATCH] fix(deploy): App-Home auf Pool statt read-only /opt (TrueNAS Goldeye) Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/ci.yml | 13 ++++++++----- deploy/truenas/scripts/truenas-deploy.sh | 3 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2c84991..ec24c3c 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -142,9 +142,10 @@ jobs: name: Deploy auf TrueNAS (Custom App) # Laeuft auf dem vorhandenen containerisierten Gitea-Runner (Label ubuntu-latest). # Der Runner hat KEINEN Host-Dateisystem-/midclt-Zugriff, daher: per SSH zum NAS-Host - # verbinden, die Deploy-Dateien nach /opt/gerbilmanager kopieren und dort + # verbinden, die Deploy-Dateien in das App-Home auf dem Pool kopieren und dort # truenas-deploy.sh ausfuehren (legt die TrueNAS "Custom App" an bzw. rollt sie neu # aus via `midclt` — die App bleibt unter Apps sichtbar). + # Hinweis: / (inkl. /opt) ist auf TrueNAS Goldeye read-only -> App-Home auf dem Pool. # # Benoetigte Repo-Secrets (Gitea -> Einstellungen -> Actions -> Secrets): # NAS_SSH_HOST z. B. 192.168.2.115 (Host-LAN-IP der NAS) @@ -152,6 +153,8 @@ jobs: runs-on: ubuntu-latest needs: [build-and-push] if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') + env: + APP_HOME: /mnt/JailStorage/DockerVolumes/gerbilmanager steps: - uses: actions/checkout@v4 @@ -167,16 +170,16 @@ jobs: run: | NAS="root@${{ secrets.NAS_SSH_HOST }}" SSH="ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=accept-new" - $SSH "$NAS" 'mkdir -p /opt/gerbilmanager/deploy/truenas/scripts' + $SSH "$NAS" "mkdir -p $APP_HOME/deploy/truenas/scripts" rsync -az -e "$SSH" \ deploy/truenas/custom-app.compose.yaml \ - "$NAS":/opt/gerbilmanager/deploy/truenas/ + "$NAS":"$APP_HOME"/deploy/truenas/ rsync -az -e "$SSH" \ deploy/truenas/scripts/ \ - "$NAS":/opt/gerbilmanager/deploy/truenas/scripts/ + "$NAS":"$APP_HOME"/deploy/truenas/scripts/ - name: Custom App neu ausrollen (midclt create/redeploy + Health-Check) run: | NAS="root@${{ secrets.NAS_SSH_HOST }}" ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=accept-new "$NAS" \ - "sh /opt/gerbilmanager/deploy/truenas/scripts/truenas-deploy.sh" + "sh $APP_HOME/deploy/truenas/scripts/truenas-deploy.sh" diff --git a/deploy/truenas/scripts/truenas-deploy.sh b/deploy/truenas/scripts/truenas-deploy.sh index 67aadd8..6f0ea85 100644 --- a/deploy/truenas/scripts/truenas-deploy.sh +++ b/deploy/truenas/scripts/truenas-deploy.sh @@ -16,7 +16,8 @@ set -eu APP_NAME=gerbilmanager -COMPOSE_DIR="${COMPOSE_DIR:-/opt/gerbilmanager}" +# TrueNAS Goldeye: / (inkl. /opt) ist read-only -> App-Home liegt auf dem Pool. +COMPOSE_DIR="${COMPOSE_DIR:-/mnt/JailStorage/DockerVolumes/gerbilmanager}" DEPLOY_DIR="$COMPOSE_DIR/deploy/truenas" ENV_FILE="${ENV_FILE:-$DEPLOY_DIR/.env}" TEMPLATE="$DEPLOY_DIR/custom-app.compose.yaml"