docs: refresh diagrams and add node overview
This commit is contained in:
parent
27a1be729f
commit
f686a160e3
3 changed files with 68 additions and 37 deletions
|
|
@ -16,13 +16,13 @@
|
|||
<div class="diagram">
|
||||
<pre class="mermaid">
|
||||
flowchart LR
|
||||
Browser[Client browser] -->|HTTP/HTTPS| Next[Next.js App Router / SSR-ISR + API routes]
|
||||
Next --> Prisma[Prisma ORM]
|
||||
Prisma --> Postgres[(PostgreSQL)]
|
||||
Next --> Mailer[SMTP mailer (smtp.sohva.org + DKIM)]
|
||||
Next --> Storage[Image URLs (remote bucket)]
|
||||
Admin[Admin and Moderators] --> Next
|
||||
Next --> Auth[Auth module / JWT session cookie]
|
||||
Browser["Client browser"] -->|"HTTPS"| Next["Next.js App Router\nSSR/ISR + API routes"]
|
||||
Next --> Auth["Auth/session module\n(JWT cookie)"]
|
||||
Next --> Prisma["Prisma ORM"]
|
||||
Prisma --> Postgres[(PostgreSQL)]
|
||||
Next --> Mailer["SMTP mailer\nsmtp.sohva.org + DKIM"]
|
||||
Next --> Storage["Image storage (remote bucket)"]
|
||||
Admin["Admins & moderators"] --> Next
|
||||
</pre>
|
||||
</div>
|
||||
<div class="callout">Edit the Mermaid block above to evolve the architecture.</div>
|
||||
|
|
@ -41,8 +41,8 @@ flowchart LR
|
|||
string id
|
||||
string email
|
||||
string passwordHash
|
||||
Role role
|
||||
UserStatus status
|
||||
string role
|
||||
string status
|
||||
datetime emailVerifiedAt
|
||||
datetime approvedAt
|
||||
datetime rejectedAt
|
||||
|
|
@ -50,23 +50,27 @@ flowchart LR
|
|||
}
|
||||
LISTING {
|
||||
string id
|
||||
ListingStatus status
|
||||
string status
|
||||
datetime approvedAt
|
||||
datetime rejectedAt
|
||||
datetime removedAt
|
||||
string country
|
||||
string region
|
||||
string city
|
||||
float latitude
|
||||
float longitude
|
||||
}
|
||||
LISTINGTRANSLATION {
|
||||
string id
|
||||
string slug
|
||||
string title
|
||||
string locale
|
||||
string teaser
|
||||
}
|
||||
LISTINGIMAGE {
|
||||
string id
|
||||
string url
|
||||
boolean isCover
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -16,16 +16,16 @@
|
|||
<div class="diagram">
|
||||
<pre class="mermaid">
|
||||
flowchart LR
|
||||
Dev[Developer] -->|npm run lint| Lint
|
||||
Dev --> BuildScript[./deploy/build.sh]
|
||||
Lint --> BuildScript
|
||||
BuildScript --> Docker[Docker buildx multi-stage]
|
||||
Docker --> Image[registry.halla-aho.net/thalla/lomavuokraus-web]
|
||||
Image --> Push[./deploy/push.sh]
|
||||
Push --> DeployStg[./deploy/deploy-staging.sh]
|
||||
Push --> DeployProd[./deploy/deploy-prod.sh]
|
||||
DeployStg --> K8sStg[kubectl apply + rollout (staging)]
|
||||
DeployProd --> K8sProd[kubectl apply + rollout (prod)]
|
||||
Dev["Developer"] -->|"npm run lint"| Lint
|
||||
Dev --> Build["./deploy/build.sh"]
|
||||
Lint --> Build
|
||||
Build --> Docker["Docker buildx\nmulti-stage"]
|
||||
Docker --> Image["registry.halla-aho.net/thalla/lomavuokraus-web"]
|
||||
Image --> Push["./deploy/push.sh"]
|
||||
Push --> DeployStg["./deploy/deploy-staging.sh"]
|
||||
Push --> DeployProd["./deploy/deploy-prod.sh"]
|
||||
DeployStg --> RolloutStg["kubectl apply + rollout\n(staging)"]
|
||||
DeployProd --> RolloutProd["kubectl apply + rollout\n(prod)"]
|
||||
</pre>
|
||||
</div>
|
||||
<div class="callout">Edit the Mermaid block to reflect pipeline changes; no external tooling required.</div>
|
||||
|
|
|
|||
|
|
@ -15,28 +15,55 @@
|
|||
<h2>Traffic flow</h2>
|
||||
<div class="diagram">
|
||||
<pre class="mermaid">
|
||||
graph LR
|
||||
User[User Browser] -->|HTTPS| Traefik[Traefik Ingress (IngressClass traefik)]
|
||||
Traefik -->|Host: lomavuokraus.fi / staging.lomavuokraus.fi| Service[Service port 80 to 3000]
|
||||
Service --> Pod[Next.js Pods (2)]
|
||||
Pod --> DB[(PostgreSQL 46.62.203.202)]
|
||||
Pod --> SMTP[smtp.sohva.org]
|
||||
subgraph Cluster [k3s Cluster hel1 cx22 157.180.66.64]
|
||||
Traefik
|
||||
Service
|
||||
Pod
|
||||
CertMgr[cert-manager]
|
||||
Secret[Secrets: lomavuokraus-web-secrets]
|
||||
CM[ConfigMap: lomavuokraus-web-config]
|
||||
end
|
||||
CertMgr -->|TLS| Traefik
|
||||
Registry[registry.halla-aho.net/thalla/lomavuokraus-web] -->|pull| Pod
|
||||
DNS[lomavuokraus.fi / staging.lomavuokraus.fi / api.lomavuokraus.fi] --> Traefik
|
||||
flowchart LR
|
||||
DNS["lomavuokraus.fi\nstaging.lomavuokraus.fi\napi.lomavuokraus.fi"] --> Traefik["Traefik ingress\n(class: traefik)"]
|
||||
User["User browser"] -->|"HTTPS"| Traefik
|
||||
CertMgr["cert-manager\nletsencrypt prod/staging"] -->|"TLS"| Traefik
|
||||
subgraph Cluster["k3s hel1 cx22 (157.180.66.64)"]
|
||||
Traefik --> Service["Service :80 -> 3000"]
|
||||
Service --> Pod["Next.js pods (2)"]
|
||||
Pod --> DB["PostgreSQL 46.62.203.202"]
|
||||
Pod --> SMTP["smtp.sohva.org"]
|
||||
Secret["Secret: lomavuokraus-web-secrets"]
|
||||
CM["ConfigMap: lomavuokraus-web-config"]
|
||||
end
|
||||
Registry["registry.halla-aho.net/thalla/lomavuokraus-web"] -->|"pull"| Pod
|
||||
</pre>
|
||||
</div>
|
||||
<div class="callout">Mermaid renders directly in the browser; edit the graph in this file to update.</div>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Hetzner nodes</h2>
|
||||
<div class="diagram">
|
||||
<pre class="mermaid">
|
||||
flowchart TB
|
||||
Users["Users"] -->|"HTTPS"| K3s["Node A: k3s (hel1 cx22)\nTraefik + cert-manager"]
|
||||
subgraph HetznerCloud["Hetzner Cloud"]
|
||||
K3s
|
||||
DB["Node B: Postgres VM\n46.62.203.202"]
|
||||
end
|
||||
|
||||
subgraph Prod["Prod namespace"]
|
||||
Prod1["Next.js pod #1 (prod)"]
|
||||
Prod2["Next.js pod #2 (prod)"]
|
||||
end
|
||||
|
||||
subgraph Staging["Staging namespace"]
|
||||
Stg1["Next.js pod #1 (staging)"]
|
||||
Stg2["Next.js pod #2 (staging)"]
|
||||
end
|
||||
|
||||
K3s --> Prod1
|
||||
K3s --> Stg1
|
||||
Prod1 --> DB
|
||||
Prod2 --> DB
|
||||
Stg1 --> DB
|
||||
Stg2 --> DB
|
||||
</pre>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Cluster & Namespaces</h2>
|
||||
<ul>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue