Files
ez-api/.env.example
zenfun 9518ae3fec 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
2025-12-22 14:32:27 +08:00

31 lines
903 B
Plaintext

# Control Plane
EZ_API_PORT=8080
EZ_PG_DSN=host=postgres user=postgres password=postgres dbname=ezapi port=5432 sslmode=disable
EZ_LOG_PG_DSN=
EZ_REDIS_ADDR=redis:6379
EZ_REDIS_PASSWORD=
EZ_REDIS_DB=0
EZ_ADMIN_TOKEN=admin123
EZ_INTERNAL_STATS_TOKEN=internal123
EZ_CORS_ALLOW_ORIGINS=*
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
EZ_BALANCER_LOG_SINK_BASE_URL=http://ez-api:8080
EZ_BALANCER_LOG_SINK_TIMEOUT_SECONDS=3
EZ_BALANCER_STATS_FLUSH_ENABLED=false
EZ_BALANCER_STATS_FLUSH_BASE_URL=http://ez-api:8080
EZ_BALANCER_STATS_FLUSH_TOKEN=internal123
EZ_BALANCER_STATS_FLUSH_INTERVAL_SECONDS=300
EZ_BALANCER_STATS_FLUSH_BATCH_SIZE=200
EZ_BALANCER_STATS_FLUSH_TIMEOUT_SECONDS=5