feat(F-002): database foundation with migrations and dev compose
- node-pg-migrate + pg: baseline migration (extensions, app_meta) with working down - src/infrastructure/db fail-fast pool and typed query helper - docker-compose: postgres:16-alpine + redis:7-alpine with one-command up - table naming convention <module>_<table> documented in README - integration tests (6) against real PostgreSQL; strict identifier validation for test DDL after security-gate hardening round - deps justified in spec/tech.md; all gates approved; verify.sh green
This commit is contained in:
30
project/docker-compose.yml
Normal file
30
project/docker-compose.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: mdv-dev-postgres
|
||||
environment:
|
||||
# Dev-only credentials. Public by design, never reuse them outside local dev.
|
||||
POSTGRES_USER: mdv
|
||||
POSTGRES_PASSWORD: mdv_dev_only
|
||||
POSTGRES_DB: mercadodevida
|
||||
ports:
|
||||
- '5432:5432'
|
||||
volumes:
|
||||
- mdv_pg_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'pg_isready -U mdv -d mercadodevida']
|
||||
interval: 2s
|
||||
timeout: 3s
|
||||
retries: 30
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: mdv-dev-redis
|
||||
ports:
|
||||
- '6379:6379'
|
||||
volumes:
|
||||
- mdv_redis_data:/data
|
||||
|
||||
volumes:
|
||||
mdv_pg_data:
|
||||
mdv_redis_data:
|
||||
Reference in New Issue
Block a user