PDF-004B Staging Postgres Stack Provisioning¶
Fecha local: 2026-06-19
Estado:
PROVISIONED / HEALTHY / NO BUSINESS DDL / NO SECRETS / NO HOST PORT / SANDBOX INTACT
portal_visible = yes
Scope: tenant
tenant_id: alpuntodeventa
Owner: Gabi / Carlos Canu
Fuente de verdad:
docs/tenants/alpuntodeventa/business-observer/production/PDF-004B-STAGING-POSTGRES-STACK-PROVISIONING.md
1. Objetivo¶
Provisionar en el VPS el stack PostgreSQL staging-vps real de
Business Observer, creando solo infraestructura Docker:
- path del stack;
- secret fuera de Git;
- red Docker;
- volumen Docker;
- contenedor PostgreSQL staging.
Sin crear todavia:
openclaw_business_observer_staging;- schema
business_observer; - roles de negocio staging;
- tablas, grants, pipelines o sync diaria.
2. Safe point¶
| Control | Valor |
|---|---|
| workspace | C:\APV\openclawai |
| rama | main |
HEAD/origin observado al iniciar |
7b07c6e4b7d856224f8ea1bc992c7762fc5d39c2 |
| ultimo commit observado | docs: prepare business observer staging postgres stack plan |
| dictamen | SAFE POINT PASS |
3. Preflight local¶
| Control | Resultado |
|---|---|
git status -sb |
PASS ## main...origin/main |
git rev-parse HEAD |
PASS 7b07c6e4b7d856224f8ea1bc992c7762fc5d39c2 |
git diff --check |
PASS limpio al iniciar |
.\\.venv-portal\\Scripts\\mkdocs.exe build --strict |
PASS en esta workstation |
Nota operativa:
- el path
..\\.venv-portal\\Scripts\\mkdocs.exeno existe en este repo; - la validacion correcta fue
.\\.venv-portal\\Scripts\\mkdocs.exe build --strict.
4. Preflight VPS read-only antes de tocar¶
| Control | Observado |
|---|---|
| hostname | srv977009 |
| uptime | up 18 days, 11:27 |
disco / |
96G total, 28G usado, 69G libre, 29% |
| memoria | 7.8Gi total, 2.1Gi usada, 5.7Gi disponible |
contenedor openclaw-business-observer-postgres-staging |
ABSENT |
volumen openclaw_bo_postgres_staging_data |
ABSENT |
red openclaw-bo-staging-internal |
ABSENT |
path /opt/stacks/business-observer-staging |
ABSENT |
sandbox openclaw-postgres-sandbox |
healthy / fuera de alcance |
host port 5432 publicado |
NO |
Dictamen preflight:
text
SIN COLISIONES
SANDBOX PRESENTE E INTOCABLE
GO PARA PROVISIONING DE INFRAESTRUCTURA
5. Provisioning ejecutado¶
Recursos creados:
| Recurso | Valor final |
|---|---|
| stack path | /opt/stacks/business-observer-staging |
| compose activo | /opt/stacks/business-observer-staging/docker-compose.yml |
| runtime env | /opt/stacks/business-observer-staging/.env.business-observer-staging |
| secret dir fuera de Git | /opt/secrets/openclaw/business-observer-staging |
| secret file fuera de Git | /opt/secrets/openclaw/business-observer-staging/postgres_bootstrap_password |
| contenedor | openclaw-business-observer-postgres-staging |
| volumen | openclaw_bo_postgres_staging_data |
| red | openclaw-bo-staging-internal |
| imagen | postgres:16.14-alpine |
Bootstrap final aplicado:
- catalog bootstrap:
postgres; - user bootstrap:
postgres; - secret password: archivo fuera de Git con permisos
600; - compose runtime:
docker compose --env-file .env.business-observer-staging up -d.
Nota operativa:
- hubo un primer intento con
docker compose up -dsin--env-file; - el contenedor quedo
unhealthypor interpolacion vacia; - se recreo de inmediato el stack sin datos utiles persistidos con
docker compose down -v --remove-orphansy luegodocker compose --env-file .env.business-observer-staging up -d; - el estado aceptado y documentado es solo el estado final
healthy.
6. Permisos y secretos¶
| Ruta | Estado |
|---|---|
/opt/stacks/business-observer-staging/.env.business-observer-staging |
600 root:root |
/opt/secrets/openclaw/business-observer-staging |
700 root:root |
/opt/secrets/openclaw/business-observer-staging/postgres_bootstrap_password |
600 root:root |
Confirmaciones:
- secreto generado en el VPS;
- secreto no impreso;
- secreto no copiado al repo;
.envruntime sin password inline;- Git sin credenciales reales nuevas.
7. Fingerprint no sensible final¶
| Control | Resultado |
|---|---|
| hostname | srv977009 |
| container | openclaw-business-observer-postgres-staging |
| internal network | openclaw-bo-staging-internal |
| volume | openclaw_bo_postgres_staging_data |
| DB bootstrap visible | postgres |
| PostgreSQL version | 16.14 |
| admin logico bootstrap | postgres |
| host port binding | {} |
Resumen fingerprint:
text
srv977009|openclaw-business-observer-postgres-staging|openclaw-bo-staging-internal|no-host-port-binding|postgres|postgres|PostgreSQL 16.14
8. Validaciones runtime¶
| Validacion | Resultado |
|---|---|
| contenedor existe | PASS |
| estado contenedor | PASS running healthy |
| healthcheck activo | PASS |
| red existe | PASS |
| volumen existe | PASS |
docker compose --env-file .env.business-observer-staging config --quiet |
PASS |
host port 5432 publicado |
PASS NO |
HostConfig.PortBindings |
PASS {} |
logs con patrones password|secret |
PASS CLEAN_NO_SECRET_PATTERN |
sandbox openclaw-postgres-sandbox |
PASS healthy |
9. Confirmacion explicita de no DDL de negocio¶
Validaciones de catalogo:
| Control | Resultado |
|---|---|
openclaw_business_observer_staging |
ABSENT |
schema business_observer |
ABSENT |
roles openclaw_bo_staging_owner/writer/reader/reporting_ro |
ABSENT |
Confirmado:
- no se ejecuto
CREATE DATABASE openclaw_business_observer_staging; - no se ejecuto
CREATE SCHEMA business_observer; - no se ejecutaron
CREATE ROLEde negocio; - no se ejecutaron tablas, grants ni
SOURCE-003; - no se habilito sync diaria ni scheduler.
10. Sandbox guardrail¶
Confirmado:
openclaw-postgres-sandboxsiguehealthy;- no se removio ni recreo;
- no se compartio volumen;
- no se publico puerto nuevo en host;
- no se uso como staging real del
Business Observer.
11. Rollback candidate no ejecutado¶
Si se autorizara remover este stack en una tarea separada:
text
cd /opt/stacks/business-observer-staging
docker compose --env-file .env.business-observer-staging down
docker volume rm openclaw_bo_postgres_staging_data
docker network rm openclaw-bo-staging-internal
rm -f /opt/secrets/openclaw/business-observer-staging/postgres_bootstrap_password
rm -f /opt/stacks/business-observer-staging/.env.business-observer-staging
Estado:
ROLLBACK CANDIDATE DOCUMENTADO / NO EJECUTADO
12. Archivos modificados¶
| Archivo | Impacto |
|---|---|
infra/business-observer/staging/postgres/docker-compose.business-observer-staging.candidate.yml |
aclara uso de --env-file y conserva bootstrap sin DB de negocio |
infra/business-observer/staging/postgres/.env.business-observer-staging.example |
fija bootstrap seguro sobre postgres y secret path fuera de Git |
docs/tenants/alpuntodeventa/business-observer/production/PDF-004A-STAGING-POSTGRES-STACK-PREFLIGHT-PLAN.md |
alinea el candidate con bootstrap sin DB de negocio |
docs/tenants/alpuntodeventa/business-observer/production/PDF-004B-STAGING-POSTGRES-STACK-PROVISIONING.md |
evidencia formal de provisioning |
13. Validacion final local¶
| Control | Resultado esperado de cierre |
|---|---|
git diff --check |
PASS |
.\\.venv-portal\\Scripts\\mkdocs.exe build --strict |
PASS |
| busqueda simple de secretos en diff | PASS |
| ningun secreto en Git | PASS |
14. Conclusion¶
text
PDF-004B PASS
POSTGRES STAGING STACK = PROVISIONED
CONTAINER = openclaw-business-observer-postgres-staging
HEALTH = HEALTHY
NETWORK = openclaw-bo-staging-internal
VOLUME = openclaw_bo_postgres_staging_data
HOST PORT 5432 = NOT PUBLISHED
SANDBOX = INTACT / HEALTHY
BUSINESS DB = NOT CREATED
BUSINESS SCHEMA = NOT CREATED
BUSINESS ROLES = NOT CREATED
BUSINESS DDL = NOT EXECUTED
SECRETS = OUT OF GIT
ROLLBACK = DOCUMENTED / NOT EXECUTED