Files
race b4777a5e4d rewire 2026-08-11: single-mount NFS architecture
- topology.svg, container-tree.svg, data-flow.svg: show /srv/nc-files
  bound directly into nextcloud container at /mnt/ncdata (no
  intermediate /mnt/nc-data/nextcloud-data layer).
- architecture.html: explain rewire, update storage table, remove
  pre-rewire 'why two layers' section.
- procedure.html: NEXTCLOUD_DATADIR=/srv/nc-files, no mastercontainer
  bind, add §2.5 Rewire 2026-08-11 with recovery procedure,
  update backup script to also tar local nextcloud app volume,
  fix 4.3 verification (302 -> /login, status.php, file visibility).
- operations.html: 4 backup files now (added aio-nextcloud-app.tar.gz),
  restore procedures updated, single-file restore uses new tar layout.
- troubleshooting.html: add 3 new sections — appdata-missing,
  nextcloud-not-spawning, collabora-discovery-warning.
- request-flow.svg: remove nextcloud/ subdir from NFS write path.
- index.html, README.md: update paths and metadata.
2026-08-11 12:09:26 -05:00

138 lines
8.1 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1100 720" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif">
<defs>
<style>
.lbl { fill: #e6e6e6; font-size: 13px; }
.lbl-sm { fill: #a8b0bd; font-size: 11px; }
.lbl-tiny { fill: #8088a0; font-size: 10px; }
.ttl { fill: #ffffff; font-size: 16px; font-weight: 600; }
.lane-ttl { fill: #ffffff; font-size: 12px; font-weight: 600; }
.step { fill: #1f2230; stroke: #3b4255; stroke-width: 1.5; }
.step-alt { fill: #252938; stroke: #4a5267; stroke-width: 1.5; }
.ok { fill: #1f2e28; stroke: #4a8a6b; stroke-width: 1.5; }
.step-emp { fill: #1f2c3a; stroke: #4a78b5; stroke-width: 2; }
.arrow-flow { stroke: #7aa2f7; stroke-width: 2; fill: none; marker-end: url(#arr-b); }
.arrow-back { stroke: #d97a7a; stroke-width: 2; fill: none; marker-end: url(#arr-r); }
.arrow-ok { stroke: #6cba92; stroke-width: 2; fill: none; marker-end: url(#arr-g); }
.arrow-time { stroke: #d9a96b; stroke-width: 1.5; fill: none; stroke-dasharray: 2 2; }
</style>
<marker id="arr-b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
<path d="M0,0 L10,5 L0,10 z" fill="#7aa2f7"/>
</marker>
<marker id="arr-g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
<path d="M0,0 L10,5 L0,10 z" fill="#6cba92"/>
</marker>
<marker id="arr-r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
<path d="M0,0 L10,5 L0,10 z" fill="#d97a7a"/>
</marker>
</defs>
<rect width="1100" height="720" fill="#0f1117"/>
<text x="40" y="38" class="ttl">Request Flow — file upload via WebDAV</text>
<text x="40" y="58" class="lbl-sm">curl PUT smoke-test.md · 2026-08-10 · HTTP 201 Created</text>
<!-- Lanes -->
<line x1="180" y1="100" x2="180" y2="690" stroke="#3b4255" stroke-width="1"/>
<line x1="360" y1="100" x2="360" y2="690" stroke="#3b4255" stroke-width="1"/>
<line x1="540" y1="100" x2="540" y2="690" stroke="#3b4255" stroke-width="1"/>
<line x1="720" y1="100" x2="720" y2="690" stroke="#3b4255" stroke-width="1"/>
<line x1="900" y1="100" x2="900" y2="690" stroke="#3b4255" stroke-width="1"/>
<text x="90" y="120" text-anchor="middle" class="lane-ttl">Client</text>
<text x="270" y="120" text-anchor="middle" class="lane-ttl">DNS</text>
<text x="450" y="120" text-anchor="middle" class="lane-ttl">Caddy</text>
<text x="630" y="120" text-anchor="middle" class="lane-ttl">AIO Apache</text>
<text x="810" y="120" text-anchor="middle" class="lane-ttl">PHP-FPM</text>
<text x="1000" y="120" text-anchor="middle" class="lane-ttl">Storage</text>
<text x="90" y="136" text-anchor="middle" class="lbl-tiny">curl</text>
<text x="270" y="136" text-anchor="middle" class="lbl-tiny">Cloudflare</text>
<text x="450" y="136" text-anchor="middle" class="lbl-tiny">caddy-caddy-1</text>
<text x="630" y="136" text-anchor="middle" class="lbl-tiny">:11000</text>
<text x="810" y="136" text-anchor="middle" class="lbl-tiny">:9000</text>
<text x="1000" y="136" text-anchor="middle" class="lbl-tiny">NFS</text>
<!-- Steps -->
<!-- 1. PUT request -->
<rect x="20" y="160" width="160" height="50" rx="4" class="step-emp"/>
<text x="100" y="180" text-anchor="middle" class="lbl">PUT</text>
<text x="100" y="197" text-anchor="middle" class="lbl-tiny">/remote.php/dav/...</text>
<!-- 2. DNS lookup -->
<rect x="200" y="160" width="160" height="50" rx="4" class="step"/>
<text x="280" y="180" text-anchor="middle" class="lbl">Resolve office.rmf44.xyz</text>
<text x="280" y="197" text-anchor="middle" class="lbl-tiny">→ 192.255.159.202</text>
<!-- 3. TLS handshake + request to Caddy -->
<rect x="370" y="160" width="160" height="60" rx="4" class="step"/>
<text x="450" y="180" text-anchor="middle" class="lbl">TLS handshake</text>
<text x="450" y="197" text-anchor="middle" class="lbl-tiny">Let's Encrypt cert</text>
<text x="450" y="212" text-anchor="middle" class="lbl-tiny">office.rmf44.xyz</text>
<!-- 4. Caddy routes -->
<rect x="370" y="240" width="160" height="50" rx="4" class="step"/>
<text x="450" y="260" text-anchor="middle" class="lbl">Match Host header</text>
<text x="450" y="277" text-anchor="middle" class="lbl-tiny">reverse_proxy :11000</text>
<!-- 5. NetBird forward -->
<rect x="555" y="320" width="160" height="50" rx="4" class="step-alt"/>
<text x="635" y="340" text-anchor="middle" class="lbl">WireGuard P2P</text>
<text x="635" y="357" text-anchor="middle" class="lbl-tiny">100.79.4.103 → 100.79.142.164</text>
<!-- 6. Apache receives -->
<rect x="555" y="395" width="160" height="50" rx="4" class="step-emp"/>
<text x="635" y="415" text-anchor="middle" class="lbl">AIO Apache :11000</text>
<text x="635" y="432" text-anchor="middle" class="lbl-tiny">terminate, forward :9000</text>
<!-- 7. PHP-FPM auth -->
<rect x="735" y="395" width="160" height="50" rx="4" class="step"/>
<text x="815" y="415" text-anchor="middle" class="lbl">PHP-FPM Nextcloud</text>
<text x="815" y="432" text-anchor="middle" class="lbl-tiny">auth via session cookie</text>
<!-- 8. WebDAV write -->
<rect x="735" y="465" width="160" height="60" rx="4" class="step"/>
<text x="815" y="485" text-anchor="middle" class="lbl">WebDAV handler</text>
<text x="815" y="503" text-anchor="middle" class="lbl-tiny">authorize /admin/files/</text>
<text x="815" y="518" text-anchor="middle" class="lbl-tiny">write smoke-test.md</text>
<!-- 9. NFS write -->
<rect x="920" y="465" width="160" height="60" rx="4" class="ok"/>
<text x="1000" y="485" text-anchor="middle" class="lbl" fill="#9d7ad9">NFS write</text>
<text x="1000" y="503" text-anchor="middle" class="lbl-tiny" fill="#9d7ad9">→ /slab/container_storage/office/</text>
<text x="1000" y="518" text-anchor="middle" class="lbl-tiny" fill="#9d7ad9">admin/files/</text>
<!-- 10. 201 Created returned -->
<rect x="20" y="555" width="160" height="50" rx="4" class="ok"/>
<text x="100" y="575" text-anchor="middle" class="lbl" fill="#9d7ad9">HTTP/2 201 Created</text>
<text x="100" y="592" text-anchor="middle" class="lbl-tiny" fill="#9d7ad9">curl exits 0</text>
<!-- Response path (dashed red arrows going back) -->
<line x1="920" y1="495" x2="180" y2="495" stroke="#3b4255" stroke-dasharray="2 2" stroke-width="1"/>
<!-- Forward arrows -->
<line x1="100" y1="160" x2="270" y2="160" class="arrow-flow"/>
<line x1="270" y1="210" x2="450" y2="160" class="arrow-flow"/>
<line x1="450" y1="220" x2="450" y2="240" class="arrow-flow"/>
<line x1="530" y1="265" x2="555" y2="345" class="arrow-flow"/>
<line x1="635" y1="370" x2="635" y2="395" class="arrow-flow"/>
<line x1="715" y1="420" x2="735" y2="420" class="arrow-flow"/>
<line x1="895" y1="495" x2="920" y2="495" class="arrow-ok"/>
<!-- Response arrows (back through lanes) -->
<line x1="180" y1="495" x2="100" y2="555" class="arrow-back"/>
<text x="510" y="485" text-anchor="middle" class="lbl-tiny" fill="#d97a7a">201 Created (response)</text>
<!-- Timing annotation -->
<text x="100" y="640" text-anchor="middle" class="lbl-tiny">total ≈ 50ms</text>
<text x="450" y="640" text-anchor="middle" class="lbl-tiny">TLS: ~15ms</text>
<text x="635" y="640" text-anchor="middle" class="lbl-tiny">P2P hop: ~2ms</text>
<text x="815" y="640" text-anchor="middle" class="lbl-tiny">PHP-FPM: ~25ms</text>
<text x="1000" y="640" text-anchor="middle" class="lbl-tiny">NFS: ~5ms</text>
<!-- Note -->
<rect x="20" y="660" width="1060" height="40" rx="4" class="step" stroke="#d9a96b"/>
<text x="550" y="681" text-anchor="middle" class="lbl-sm" fill="#d9a96b">Tip: WOPI (Collabora file open) follows a parallel path — browser iframe → apache → nextcloud PHP → wopi URL → apache proxy → collabora → WOPI read</text>
<text x="550" y="694" text-anchor="middle" class="lbl-tiny" fill="#d9a96b">the WOPI URL is verified as http://nextcloud-aio-apache.nextcloud-aio:23973 (internal docker network only)</text>
<text x="1060" y="715" text-anchor="end" class="lbl-tiny">2026-08-11 · nextcloud_office · rewire</text>
</svg>