What ships (verifiable without live DB, 64 new tests): - db/migrations/0000_initial_schema.sql (Drizzle-generated, 7 tables) + .down.sql + registry entry - db/migrations/rehearse.ts: forward-then-rollback round-trip with row-count hash check (DoD 2.2) - infra/docker-compose.yml: postgres 17 + redis 7 + openobserve for local dev (5433/6380/5080) - packages/schema/src/rate-limit.ts: pluggable store; 4 tests including 21st-of-20 reject (DoD 2.4) - packages/schema/src/csrf.ts: HMAC double-submit token; 8 tests covering forgery + tamper + malformed - packages/schema/src/authz.ts: 3-role Cerbos-equivalent rules (operator/approver/viewer); 6 tests - packages/schema/src/api-contracts.ts: Zod schemas for /api/content, /api/approvals, /api/publications, /api/feature-flags + idempotencyKeyOf; 11 tests What defers to live-DB session: - 2.3 admin route handlers integration tests (401/403/200/422 contract suite) - 2.2 actual rehearsal execution against staging DB Total: 79/79 tests pass across 9 files in 4 packages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
container_name: stargue-pe-postgres
|
|
environment:
|
|
POSTGRES_USER: stargue
|
|
POSTGRES_PASSWORD: stargue_dev
|
|
POSTGRES_DB: stargue_publishing_engine
|
|
ports:
|
|
- "5433:5432"
|
|
volumes:
|
|
- pe_pg_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "stargue", "-d", "stargue_publishing_engine"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: stargue-pe-redis
|
|
ports:
|
|
- "6380:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
openobserve:
|
|
image: public.ecr.aws/zinclabs/openobserve:latest
|
|
container_name: stargue-pe-openobserve
|
|
environment:
|
|
ZO_ROOT_USER_EMAIL: dev@stargue.local
|
|
ZO_ROOT_USER_PASSWORD: stargue_dev
|
|
ZO_DATA_DIR: /data
|
|
ports:
|
|
- "5080:5080"
|
|
volumes:
|
|
- pe_oo_data:/data
|
|
|
|
volumes:
|
|
pe_pg_data:
|
|
pe_oo_data:
|