<mxfile host="app.diagrams.net" agent="combo-raport-app" version="24.7.17">
  <diagram id="env-prod" name="Środowisko prod (home.pl)">
    <mxGraphModel dx="1600" dy="1000" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1400" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />

        <!-- TITLE -->
        <mxCell id="title" value="combo-raport-app — środowisko produkcyjne (VPS home.pl, 212.132.103.157, Debian 13)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=16;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1320" height="30" as="geometry" />
        </mxCell>

        <!-- INTERNET -->
        <mxCell id="internet" value="🌍 Internet (HTTPS)" style="ellipse;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=13;fontStyle=1" vertex="1" parent="1">
          <mxGeometry x="600" y="70" width="200" height="60" as="geometry" />
        </mxCell>

        <!-- VPS BOX -->
        <mxCell id="vps" value="VPS home.pl &#8226; 4 vCPU / 7.7 GiB RAM / 237 GiB" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;dashed=1;verticalAlign=top;fontSize=12;fontStyle=1;align=left;spacingLeft=12;spacingTop=8" vertex="1" parent="1">
          <mxGeometry x="40" y="160" width="1320" height="600" as="geometry" />
        </mxCell>

        <!-- NGINX HOST -->
        <mxCell id="nginx" value="nginx (host)&#10;&#10;arcane.t-pizza.pl  → :3552&#10;combo.t-pizza.pl   → :4173&#10;id.t-pizza.pl       → :9000&#10;wiki.tepizza.pl   → :6875&#10;&#10;ECDSA + certbot --nginx (auto-renew)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacingLeft=10;spacingTop=8;fontSize=11" vertex="1" parent="1">
          <mxGeometry x="80" y="210" width="280" height="180" as="geometry" />
        </mxCell>

        <!-- DOCKER NETWORK web -->
        <mxCell id="web-net" value="Docker network: web (external, bridge)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;verticalAlign=top;fontSize=12;fontStyle=1;align=left;spacingLeft=10;spacingTop=6" vertex="1" parent="1">
          <mxGeometry x="400" y="200" width="920" height="540" as="geometry" />
        </mxCell>

        <!-- ARCANE -->
        <mxCell id="arcane" value="Arcane v1.19.5&#10;&#10;container: arcane&#10;port: 127.0.0.1:3552&#10;compose: /opt/docker/arcane/&#10;&#10;OIDC (DB settings, nie env):&#10; • client_id=arcane&#10; • issuer=id.t-pizza.pl/.../arcane/&#10; • adminClaim=groups → arcane-admin&#10; • localLogin = break-glass" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="430" y="240" width="280" height="220" as="geometry" />
        </mxCell>

        <!-- COMBO -->
        <mxCell id="combo" value="combo-raport-app (prod)&#10;&#10;container: combo_prod&#10;port: 127.0.0.1:4173&#10;compose: /root/combo-raport-app/&#10;&#10;React 19 + Vite + nginx-alpine&#10;dane: /public/data (JSON)&#10;volume: combo_data → email/auth" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="740" y="240" width="280" height="220" as="geometry" />
        </mxCell>

        <!-- AUTHENTIK -->
        <mxCell id="authentik" value="Authentik 2026.2.3&#10;&#10;containers:&#10; • authentik-server (:9000)&#10; • authentik-worker&#10; • authentik-postgresql&#10; • authentik-redis&#10;compose: /opt/docker/authentik/&#10;&#10;OIDC provider (apps: arcane, arcane-dev)&#10;SMTP: serwer2104579.home.pl:587" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1050" y="240" width="250" height="220" as="geometry" />
        </mxCell>

        <!-- BOOKSTACK -->
        <mxCell id="bookstack" value="BookStack 26.3.5 + MariaDB 11&#10;&#10;containers: bookstack, bookstack-db&#10;port: 127.0.0.1:6875&#10;compose (Arcane-managed):&#10;/app/data/projects/bookstack/&#10;&#10;Faza 1: AUTH_METHOD=standard&#10;Faza 2: OIDC (stub w compose)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="430" y="490" width="280" height="180" as="geometry" />
        </mxCell>

        <!-- BACKUP -->
        <mxCell id="backup" value="Backup cron&#10;&#10;/opt/docker/arcane/backup-cron.sh&#10;cron: 30 3 * * * (daily 03:30)&#10;log: /var/log/arcane-backup.log&#10;&#10;Arcane Volume Backup API&#10;→ wszystkie volumes (rotate 10)&#10;→ /opt/backups/arcane/&#10;(bind-mount /backups w kontenerze)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="740" y="490" width="280" height="180" as="geometry" />
        </mxCell>

        <!-- VOLUMES -->
        <mxCell id="volumes" value="Volumes (backed up)&#10;&#10; • arcane_arcane-data&#10; • combo_data&#10; • authentik_authentik-postgres&#10; • authentik_authentik-redis&#10; • authentik_authentik-media&#10; • authentik_authentik-templates&#10; • authentik_authentik-certs" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="1050" y="490" width="250" height="180" as="geometry" />
        </mxCell>

        <!-- EDGES: internet → nginx -->
        <mxCell id="e1" style="endArrow=block;html=1;rounded=0;strokeColor=#333333;strokeWidth=2" edge="1" parent="1" source="internet" target="nginx">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- EDGES: nginx → containers -->
        <mxCell id="e2" value=":3552" style="endArrow=block;html=1;rounded=0;strokeColor=#6c8ebf;fontSize=10" edge="1" parent="1" source="nginx" target="arcane">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e3" value=":4173" style="endArrow=block;html=1;rounded=0;strokeColor=#9673a6;fontSize=10" edge="1" parent="1" source="nginx" target="combo">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e4" value=":9000" style="endArrow=block;html=1;rounded=0;strokeColor=#d79b00;fontSize=10" edge="1" parent="1" source="nginx" target="authentik">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e5" value=":6875" style="endArrow=block;html=1;rounded=0;strokeColor=#b85450;fontSize=10" edge="1" parent="1" source="nginx" target="bookstack">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- OIDC loop: Arcane → Authentik -->
        <mxCell id="e-oidc" value="OIDC (issuer / token / userinfo)" style="endArrow=block;html=1;rounded=0;strokeColor=#d79b00;dashed=1;fontSize=10;fontStyle=2;startArrow=block;startFill=1" edge="1" parent="1" source="arcane" target="authentik">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- Backup → Arcane API -->
        <mxCell id="e-backup" value="Volume Backup API" style="endArrow=block;html=1;rounded=0;strokeColor=#82b366;dashed=1;fontSize=10;fontStyle=2" edge="1" parent="1" source="backup" target="arcane">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- Backup → volumes -->
        <mxCell id="e-backup2" value="dump → /opt/backups/arcane" style="endArrow=block;html=1;rounded=0;strokeColor=#82b366;dashed=1;fontSize=10;fontStyle=2" edge="1" parent="1" source="backup" target="volumes">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- LEGEND -->
        <mxCell id="legend" value="Legenda:&#10; ── HTTP/HTTPS&#10; - - OIDC / API wewnątrz sieci web&#10; Kolory = stack (Arcane / combo / Authentik / BookStack)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999999;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;fontSize=10" vertex="1" parent="1">
          <mxGeometry x="80" y="640" width="280" height="100" as="geometry" />
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
