#!/usr/bin/env bash # Post-deploy checks — run on TrueNAS shell after Custom App is running. set -euo pipefail PUBLIC_URL="${PUBLIC_URL:-http://gallery.mysuperlab.netcraze.pro}" LOCAL_URL="${LOCAL_URL:-http://127.0.0.1:5173}" echo "== Local container ==" curl -sf -o /dev/null -w "HTTP %{http_code}\n" "${LOCAL_URL}/" || echo "FAIL: container not reachable on :5173" echo "== API bounds ==" curl -sf "${LOCAL_URL}/api/bounds" || echo "FAIL: /api/bounds" echo "== Public URL ==" curl -sf -o /dev/null -w "HTTP %{http_code}\n" "${PUBLIC_URL}/" || echo "FAIL: public URL not reachable" echo "== Container status ==" docker ps --filter name=gallery-web --format '{{.Names}} {{.Status}}' || true echo "== Image volume ==" ls -la /mnt/BasePool/Applications/Gallery/data/images/paintings 2>/dev/null | head -5 || echo "WARN: paintings dir missing" echo "Done. Open ${PUBLIC_URL}/ in a browser."