Skip to content

docs: fix network topology — nginx is the only public door, gateway is private#16

Merged
dherrero merged 1 commit into
mainfrom
docs/fix-network-topology-mermaid
Jun 9, 2026
Merged

docs: fix network topology — nginx is the only public door, gateway is private#16
dherrero merged 1 commit into
mainfrom
docs/fix-network-topology-mermaid

Conversation

@dherrero

@dherrero dherrero commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Qué

La arquitectura dibujada en los README describía Cliente → Gateway (público) → API (privada), omitiendo nginx y pintando al gateway como la puerta pública. Además docs/SECURITY.md tenía las etiquetas (público)/(privada) invertidas.

La topología real (fuente de verdad: el compose.prod.yaml de producción) es:

Navegador → Nginx (front) → Gateway → API → PostgreSQL
                          └── gateway/api/postgres en internal-network, privados ──┘
  • Nginx (contenedor front) es el único servicio expuesto: sirve la SPA y hace reverse-proxy de /api/* al gateway (mismo origen → cookies sin CORS; el front usa ruta relativa api: '/api/v1/' y nginx/default.conf hace proxy_pass http://gateway:3100).
  • Gateway, API y PostgreSQL viven todos en internal-network (internal: true), sin entrada desde Internet.

Cambios

  • Diagramas reescritos en Mermaid (render nativo en GitHub) en README.md, docs/README_eng.md y docs/SECURITY.md, con nginx como única puerta pública y las etiquetas público/privado corregidas.

  • Texto alineado en README.md, docs/README_eng.md y apps/gateway/AGENTS.md: el gateway pasa a describirse como privado tras nginx (se elimina "único servicio expuesto a Internet").

  • compose.yaml alineado a producción: gateway movido a internal-network only (se quita edge-network y su puerto publicado); front ahora en edge-network + internal-network para poder alcanzar al gateway. Verificado con docker compose config:

    servicio redes
    front edge-network + internal-network
    gateway / api / postgresdb internal-network only

Notas

  • Solo documentación + redes de compose; sin cambios de código de aplicación.
  • edge-network se mantiene únicamente para front, como equivalente local de la red proxy externa de Coolify (para que el publish de puerto al host siga funcionando).

🤖 Generated with Claude Code

…s private

The architecture diagrams described "Client → Gateway (public) → API (private)",
omitting nginx and wrongly painting the gateway as the public entrypoint.
docs/SECURITY.md even had the (public)/(private) labels reversed.

The real topology (source of truth: production compose) is:
Browser → Nginx (front) → Gateway → API → PostgreSQL, where only the `front`
container is exposed and gateway/api/postgres all live on `internal-network`
(`internal: true`) with no inbound from the Internet.

- Rewrite the three architecture diagrams in Mermaid (renders natively on GitHub)
  in README.md, docs/README_eng.md and docs/SECURITY.md, fixing the reversed
  public/private labels and inserting nginx as the only public door.
- Align prose in README.md, docs/README_eng.md and apps/gateway/AGENTS.md:
  the gateway is private (internal-network), behind nginx — not "the only
  service exposed to the Internet".
- compose.yaml: move gateway to internal-network only (drop edge-network and
  its published port); put front on edge-network + internal-network so it can
  reach the gateway. Verified with `docker compose config`.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@dherrero dherrero merged commit 2b0e2a1 into main Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant