PostgreSQL ArchitectureΒΆ

Compose 🐳¢

flowchart LR
    subgraph role [svc-db-postgres]
        svc_postgres["postgres<br>postgres:18<br>postgres 5432"]
    end

Swarm 🐝¢

flowchart LR
    svc_postgres["postgres"]
    svc_postgres --> rep_postgres["replicas: from the host group"]
    svc_postgres --> plc_postgres["node.role == manager"]:::pinned
    classDef pinned fill:#fef7e0,stroke:#b06000,color:#3d2600;

VolumesΒΆ

flowchart LR
    vol_data["postgres_data"]
    vol_data -->|"role is manager-pinned"| local_data["node-local on the manager"]:::local
    classDef shared fill:#e6f4ea,stroke:#137333,color:#0b2e13;
    classDef local fill:#fef7e0,stroke:#b06000,color:#3d2600;

Condition

Effect

swarm, storage.backend: nfs, no nfs: false, role not pinned

shared over NFS

any one of those missing

node-local

All four conditions must hold, so pinning a role takes every one of its volumes node-local. Only the role’s primary entry counts as pinned here: a placement on any other service pins that service alone and leaves the backing of every volume unchanged. The chain is drawn rather than its result, because that coupling is what makes a placement change move data without saying so.

DependenciesΒΆ

flowchart LR
    subgraph deps [Dependencies]
        dep_svc_bkp_volume_2_local["svc-bkp-volume-2-local πŸ’»"]
        dep_svc_net_tor["svc-net-tor 🐳🐝"]
        dep_web_app_docs["web-app-docs 🐳🐝"]
    end
    subgraph role [svc-db-postgres 🐳🐝]
        svc_postgres["postgres"]
        svc_tor["tor"]
        svc_container_backup["container_backup"]
        svc_docs["docs"]
    end
    subgraph dependents [Dependents]
        dpt_svc_ai_litellm["svc-ai-litellm 🐳🐝"]
        dpt_web_app_baserow["web-app-baserow 🐳🐝"]
        dpt_web_app_bookwyrm["web-app-bookwyrm 🐳🐝"]
        dpt_web_app_chess["web-app-chess 🐳🐝"]
        dpt_web_app_confluence["web-app-confluence 🐳🐝"]
        dpt_web_app_decidim["web-app-decidim 🐳🐝"]
        dpt_web_app_discourse["web-app-discourse 🐳🐝"]
        dpt_web_app_fider["web-app-fider 🐳🐝"]
        dpt_web_app_flowise["web-app-flowise 🐳🐝"]
        dpt_web_app_funkwhale["web-app-funkwhale 🐳🐝"]
        dpt_web_app_gitlab["web-app-gitlab 🐳🐝"]
        dpt_web_app_jira["web-app-jira 🐳🐝"]
        dpt_web_app_keycloak["web-app-keycloak 🐳🐝"]
        dpt_web_app_kix["web-app-kix 🐳🐝"]
        dpt_web_app_listmonk["web-app-listmonk 🐳🐝"]
        dpt_web_app_mastodon["web-app-mastodon 🐳🐝"]
        dpt_web_app_matrix["web-app-matrix 🐳🐝"]
        dpt_web_app_mattermost["web-app-mattermost 🐳🐝"]
        dpt_web_app_mobilizon["web-app-mobilizon 🐳🐝"]
        dpt_web_app_n8n["web-app-n8n 🐳🐝"]
        dpt_web_app_odoo["web-app-odoo 🐳🐝"]
        dpt_web_app_openproject["web-app-openproject 🐳🐝"]
        dpt_web_app_opentalk["web-app-opentalk 🐳🐝"]
        dpt_web_app_peertube["web-app-peertube 🐳🐝"]
        dpt_web_app_penpot["web-app-penpot 🐳🐝"]
        dpt_web_app_pgadmin["web-app-pgadmin 🐳🐝"]
        dpt_web_app_pretix["web-app-pretix 🐳🐝"]
        dpt_web_app_semaphore["web-app-semaphore 🐳🐝"]
        dpt_web_app_stalwart["web-app-stalwart 🐳🐝"]
        dpt_web_app_taiga["web-app-taiga 🐳🐝"]
        dpt_web_app_weblate["web-app-weblate 🐳🐝"]
        dpt_web_app_xwiki["web-app-xwiki 🐳🐝"]
        dpt_web_app_zammad["web-app-zammad 🐳🐝"]
        dpt_web_svc_onlyoffice["web-svc-onlyoffice 🐳🐝"]
        dpt_web_svc_translate["web-svc-translate 🐳🐝"]
    end
    dep_svc_bkp_volume_2_local -. "0..1" .-> svc_container_backup
    dep_svc_net_tor -. "0..1" .-> svc_tor
    dep_web_app_docs -. "0..1" .-> svc_docs
    svc_postgres -. "0..1" .-> dpt_svc_ai_litellm
    svc_postgres -. "0..1" .-> dpt_web_app_baserow
    svc_postgres -. "0..1" .-> dpt_web_app_bookwyrm
    svc_postgres -. "0..1" .-> dpt_web_app_chess
    svc_postgres -. "0..1" .-> dpt_web_app_confluence
    svc_postgres -. "0..1" .-> dpt_web_app_decidim
    svc_postgres -. "0..1" .-> dpt_web_app_discourse
    svc_postgres -. "0..1" .-> dpt_web_app_fider
    svc_postgres -. "0..1" .-> dpt_web_app_flowise
    svc_postgres -. "0..1" .-> dpt_web_app_funkwhale
    svc_postgres -. "0..1" .-> dpt_web_app_gitlab
    svc_postgres -. "0..1" .-> dpt_web_app_jira
    svc_postgres -. "0..1" .-> dpt_web_app_keycloak
    svc_postgres -. "0..1" .-> dpt_web_app_kix
    svc_postgres -. "0..1" .-> dpt_web_app_listmonk
    svc_postgres -. "0..1" .-> dpt_web_app_mastodon
    svc_postgres -. "0..1" .-> dpt_web_app_matrix
    svc_postgres -. "0..1" .-> dpt_web_app_mattermost
    svc_postgres -. "0..1" .-> dpt_web_app_mobilizon
    svc_postgres -. "0..1" .-> dpt_web_app_n8n
    svc_postgres -. "0..1" .-> dpt_web_app_odoo
    svc_postgres -. "0..1" .-> dpt_web_app_openproject
    svc_postgres -. "0..1" .-> dpt_web_app_opentalk
    svc_postgres -. "0..1" .-> dpt_web_app_peertube
    svc_postgres -. "0..1" .-> dpt_web_app_penpot
    svc_postgres -. "0..1" .-> dpt_web_app_pgadmin
    svc_postgres -. "0..1" .-> dpt_web_app_pretix
    svc_postgres -. "0..1" .-> dpt_web_app_semaphore
    svc_postgres -. "0..1" .-> dpt_web_app_stalwart
    svc_postgres -. "0..1" .-> dpt_web_app_taiga
    svc_postgres -. "0..1" .-> dpt_web_app_weblate
    svc_postgres -. "0..1" .-> dpt_web_app_xwiki
    svc_postgres -. "0..1" .-> dpt_web_app_zammad
    svc_postgres -. "0..1" .-> dpt_web_svc_onlyoffice
    svc_postgres -. "0..1" .-> dpt_web_svc_translate

Symbol

Meaning

1:1 solid

fixed relationship

0..1 dashed

conditional, enabled only in matching deployments

0..0 red

declared but turned off in this role

πŸ’»

deploys to the host

🐳

deploys under compose

🐝

deploys under swarm

❌

service explicitly turned off

βš™οΈ

Ansible role dependency from meta/main.yml

Every dependency and dependent is listed; the graph is not truncated.