Compare commits

...

2 Commits

Author SHA1 Message Date
60214a7c92 fix(web): zwei tsc-Buildfehler (useMutation-Rueckgabe void, Uint8Array<ArrayBuffer>)
Some checks failed
CI / Backend Tests (.NET) (push) Successful in 1m18s
CI / Frontend Tests (Node/Vite) (push) Successful in 9m35s
CI / Docker Build & Push (push) Successful in 1m46s
CI / Deploy auf TrueNAS (Custom App) (push) Failing after 4s
Blockierten den CI-Frontend-Build (npm run build) und damit build-and-push.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 09:47:03 +02:00
45673bb066 fix(deploy): App-Home auf Pool statt read-only /opt (TrueNAS Goldeye)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-19 09:25:26 +02:00
4 changed files with 14 additions and 9 deletions

View File

@@ -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"

View File

@@ -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"

View File

@@ -32,14 +32,15 @@ export default function GerbilAcquisitionSection({ gerbilId }: { gerbilId: strin
const [note, setNote] = useState('')
const [error, setError] = useState<string | null>(null)
const save = useMutation((id: string | '') => {
const save = useMutation(async (id: string | '') => {
const body = {
gerbilId,
date: date || null,
price: price.trim() === '' ? null : Number(price),
note: note.trim() || null,
}
return id === '' ? createAcquisition(body) : updateAcquisition(id, body)
if (id === '') await createAcquisition(body)
else await updateAcquisition(id, body)
})
const removal = useMutation((id: string) => deleteAcquisition(id))

View File

@@ -25,7 +25,7 @@ export async function fetchPushConfig(): Promise<{ enabled: boolean; publicKey:
}
}
function urlBase64ToUint8Array(base64: string): Uint8Array {
function urlBase64ToUint8Array(base64: string): Uint8Array<ArrayBuffer> {
const padding = '='.repeat((4 - (base64.length % 4)) % 4)
const b64 = (base64 + padding).replace(/-/g, '+').replace(/_/g, '/')
const raw = atob(b64)