feat(docker): add dedicated PostgreSQL instance for logs

Add separate log-postgres service to docker-compose stack for storing
API logs independently from the main database.

- Add log-postgres service with PostgreSQL 15 Alpine image
- Configure environment variables for log database credentials
- Update ez-api service to depend on log-postgres health check
- Set default EZ_LOG_PG_DSN to connect to the new log database
- Update .env.example and README with new configuration options
This commit is contained in:
zenfun
2025-12-22 14:32:27 +08:00
parent 5770e496ff
commit 9518ae3fec
3 changed files with 33 additions and 2 deletions

View File

@@ -12,6 +12,11 @@ EZ_LOG_RETENTION_DAYS=30
EZ_LOG_MAX_RECORDS=1000000
EZ_LOG_PARTITIONING=off
# Log DB (docker-compose log-postgres)
LOG_POSTGRES_USER=postgres
LOG_POSTGRES_PASSWORD=postgres
LOG_POSTGRES_DB=ezapi_logs
# Data Plane
EZ_BALANCER_PORT=8081
EZ_BALANCER_LOG_SINK_ENABLED=false