fix(deploy): App-Home auf Pool statt read-only /opt (TrueNAS Goldeye)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-19 09:25:26 +02:00
parent 45b8533f18
commit 45673bb066
2 changed files with 10 additions and 6 deletions

View File

@@ -142,9 +142,10 @@ jobs:
name: Deploy auf TrueNAS (Custom App) name: Deploy auf TrueNAS (Custom App)
# Laeuft auf dem vorhandenen containerisierten Gitea-Runner (Label ubuntu-latest). # Laeuft auf dem vorhandenen containerisierten Gitea-Runner (Label ubuntu-latest).
# Der Runner hat KEINEN Host-Dateisystem-/midclt-Zugriff, daher: per SSH zum NAS-Host # 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 # truenas-deploy.sh ausfuehren (legt die TrueNAS "Custom App" an bzw. rollt sie neu
# aus via `midclt` — die App bleibt unter Apps sichtbar). # 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): # Benoetigte Repo-Secrets (Gitea -> Einstellungen -> Actions -> Secrets):
# NAS_SSH_HOST z. B. 192.168.2.115 (Host-LAN-IP der NAS) # NAS_SSH_HOST z. B. 192.168.2.115 (Host-LAN-IP der NAS)
@@ -152,6 +153,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build-and-push] needs: [build-and-push]
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
env:
APP_HOME: /mnt/JailStorage/DockerVolumes/gerbilmanager
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -167,16 +170,16 @@ jobs:
run: | run: |
NAS="root@${{ secrets.NAS_SSH_HOST }}" NAS="root@${{ secrets.NAS_SSH_HOST }}"
SSH="ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=accept-new" 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" \ rsync -az -e "$SSH" \
deploy/truenas/custom-app.compose.yaml \ deploy/truenas/custom-app.compose.yaml \
"$NAS":/opt/gerbilmanager/deploy/truenas/ "$NAS":"$APP_HOME"/deploy/truenas/
rsync -az -e "$SSH" \ rsync -az -e "$SSH" \
deploy/truenas/scripts/ \ 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) - name: Custom App neu ausrollen (midclt create/redeploy + Health-Check)
run: | run: |
NAS="root@${{ secrets.NAS_SSH_HOST }}" NAS="root@${{ secrets.NAS_SSH_HOST }}"
ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=accept-new "$NAS" \ 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"

View File

@@ -16,7 +16,8 @@
set -eu set -eu
APP_NAME=gerbilmanager 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" DEPLOY_DIR="$COMPOSE_DIR/deploy/truenas"
ENV_FILE="${ENV_FILE:-$DEPLOY_DIR/.env}" ENV_FILE="${ENV_FILE:-$DEPLOY_DIR/.env}"
TEMPLATE="$DEPLOY_DIR/custom-app.compose.yaml" TEMPLATE="$DEPLOY_DIR/custom-app.compose.yaml"