(Node.js 22 LTS · Express / Fastify / NestJS / Next.js Standalone)
«Aislamiento por diseño, no por disciplina» — (“Isolation by design, not by discipline”)
Stratum es una arquitectura de referencia y un conjunto de herramientas para operar organizaciones o aplicaciones aisladas sobre una infraestructura compartida, con aislamiento mediante namespaces de red del kernel Linux y firewall
DOCKER-USER. Está diseñada para reducir la dependencia de la disciplina operativa, y no constituye garantía de resultado.📖 Manual de Operación y Despliegue Paso a Paso · 📜 Third-Party Notices (Valkey / PostgreSQL / Licenses)
Product Suite: Stratum Sovereign Multi-Tenant Architecture
Repository: stratum-node (node-stratum)
Component: consumer-workload
Pattern: Stratum Sovereign Consumer (Tier 3)
Revision: 3.1.0
Status: Production
stratum-node provides a hardened, code-agnostic multi-stage container runtime (node:22-alpine) for Node.js 22 LTS APIs and web services (Express, Fastify, NestJS, Next.js standalone) engineered as a Tier 3 Consumer Workload within the Stratum Platform. Whether hosting a single organization or multiple organizations, deploy each organization as a stratum-org island.
Separation of Concerns: Your team places application code into
src/. When no custompackage.jsonis present, Stratum's built-in zero-dependency HTTP server (src/index.js) answers/,/health,/ready(including Valkey ACL AUTH/PING probe), and/upout of the box.
- Three Exclusive Deployment Modes (
delegated,isolated,test): Every service indocker-compose.ymlanddocker-compose.outbound.ymldeclares an explicitprofiles:list. Retired profiles (multi-org*,unique-org*,standalone,all) are removed. - Zero Public Ports (
0.0.0.0/::Prohibited, ADR-0007): Production modes (delegated,isolated) publish zero host ports. Only--profile testbinds127.0.0.1:${APP_LOCAL_PORT:-3000}:${APP_PORT:-3000}strictly on loopback. - Linux Kernel Network Namespace &
DOCKER-USERConfinement: Workloads never joinstratum_dmz,stratum_tunnel, orstratum_database_internal. Dedicated engines (postgres,valkey) live strictly insideapp_internal(internal: true,enable_ipv6: false). Optional outbound egress viadocker-compose.outbound.ymlattaches onlyapp-delegatedorapp-isolatedtostratum_outbound(enable_icc=false,DOCKER-USERfiltered). - Valkey 8.1 Prefix-Scoped ACLs (BSD-3-Clause, ADR-0005): Dedicated cache uses
valkey/valkey:8.1-alpineasuser: "999:1000",read_only: true,--aclfile /tmp/users.acl(0600) withuser default off,user healthcheck -@all +ping, and prefix-scoped app user (CACHE_USER/CACHE_PREFIX). - Pinned Versioning (Zero
:latest) & 1:1.env.exampleParity: All images (NODE_IMAGE_TAG=22-alpine,POSTGRES_VERSION=16-alpine,STRATUM_CACHE_VERSION=8.1-alpine) and Compose variables enforce 1:1 parity viastratum-core/tests/validate_specs.py.
Profile (--profile) |
App Service | Database / Cache Routing | Networks Attached |
|---|---|---|---|
delegated |
app-delegated |
DB_HOST=stratum-database-nginx · CACHE_HOST=valkey (Org Valkey ACL) |
tenant_network (stratum_${TENANT_ORG}_internal) |
isolated |
app-isolated |
DB_HOST=postgres:5432 · CACHE_HOST=valkey:6379 (private engines) |
tenant_network + app_internal (internal: true) |
test |
app-test |
DB_HOST=postgres:5432 · CACHE_HOST=valkey:6379 (local dev/CI) |
app_internal + test_local (127.0.0.1:${APP_LOCAL_PORT}:3000) |
Warning
Mandatory Queue Drain Notice (Redis → Valkey Migration):
Stratum operates its in-memory cache/queue broker without disk persistence (--save "" --appendonly no, ADR-0003 / ADR-0005). Before migrating an existing workload from legacy Redis to Valkey 8.1, drain all active queues cleanly. Compatibility aliases (redis, REDIS_HOST, REDIS_PORT, REDIS_USERNAME, REDIS_PASSWORD, REDIS_PREFIX) are preserved strictly as nominative references to the RESP2/RESP3 wire protocol (see THIRD-PARTY-NOTICES.md).
# 1. Configure 1:1 environment contract
cp .env.example .env && chmod 600 .env
# 2a. Delegated Mode (after stratum org create & stratum db create for postgres/valkey)
docker compose --profile delegated up -d --build
stratum route add acme node-api stratum-app-acme-node-delegated:3000 --domain api.acme.example.com
# 2b. Isolated Mode (dedicated Postgres 16 + Valkey 8.1 inside app_internal)
docker compose --profile isolated up -d --build
# 2c. Test Mode (local testing/CI — bound strictly to 127.0.0.1:3000)
docker compose --profile test up -d --build
curl -fsS http://127.0.0.1:3000/health
# Optional Internet Egress (delegated or isolated web service ONLY; never test mode)
docker compose -f docker-compose.yml -f docker-compose.outbound.yml --profile delegated up -d- Shared Responsibility: In
delegatedmode (stratum_${TENANT_ORG}_internal), sibling apps of the same organization share an internal bridge. Stratum enforces cross-organization network namespace isolation,DOCKER-USERkernel egress controls, per-app Valkey prefix ACLs, and container hardening; operators assume shared responsibility for intra-organization lateral risk by enforcing least-privilege per-service database roles (<org>_<service>) and using--profile isolatedfor high-risk workloads. - No Guarantee of Outcome (Obligación de medio, no de resultado): Provided "AS IS" under Apache-2.0. See THIRD-PARTY-NOTICES.md for upstream container licenses (including informational SSPL v1 review notes when connecting to shared MongoDB 8.0).
- Architect & Designer: Sandra Gabriela Puerto Torres (SGPT) (not the code creator) — https://sandrapuerto.com
- Umbrella Organization: Isora Cloud Group (non-commercial project organization; released freely to the community) — https://stratum.isora.com.co
- Code Generation & AI Engineering: Google Antigravity AI · DeepSeek (initial v1 code generation)
- Contacts: [email protected] · [email protected] · [email protected]
- License: Apache License, Version 2.0 (Apache-2.0)