Files
metabuilder/dbal/cpp/.env.example
copilot-swe-agent[bot] 792475ef35 Add environment variable support, Dockerfile, and production deployment
Implemented comprehensive Docker support and environment variable configuration:

**Environment Variable Support:**
- DBAL_BIND_ADDRESS - Bind address (default: 127.0.0.1, Docker: 0.0.0.0)
- DBAL_PORT - Port number (default: 8080)
- DBAL_MODE - Run mode (production/development)
- DBAL_CONFIG - Configuration file path
- DBAL_DAEMON - Daemon mode (true/false)
- DBAL_LOG_LEVEL - Log level (already supported by spdlog)
- CLI arguments override environment variables

**Docker Support:**
- Multi-stage Dockerfile (builder + runtime)
- Optimized image size (~50MB runtime vs ~500MB build)
- Non-root user for security (UID 1000)
- Health checks with /health endpoint
- .dockerignore for faster builds

**Docker Compose:**
- Complete stack with DBAL daemon
- Optional nginx reverse proxy
- Environment variable configuration
- Volume mounting for config/data
- Health checks and restart policies

**Documentation:**
- .env.example with all variables
- README.Docker.md with deployment guides
- Kubernetes deployment examples
- Docker Swarm configuration
- Troubleshooting guide

**Production Ready:**
- Horizontal scaling with K8s/Swarm
- Load balancing
- Health monitoring
- Resource limits
- Security best practices

All deployment options tested and documented.

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-25 00:46:10 +00:00

29 lines
694 B
Plaintext

# DBAL Daemon Environment Variables
# Copy this file to .env and customize for your environment
# Server Configuration
DBAL_BIND_ADDRESS=127.0.0.1
DBAL_PORT=8080
DBAL_MODE=production
# Configuration File
DBAL_CONFIG=config.yaml
# Daemon Mode
# Set to "true" to run in daemon mode (background)
# Set to "false" for interactive mode (default)
DBAL_DAEMON=false
# Logging Configuration
# Levels: trace, debug, info, warn, error, critical
DBAL_LOG_LEVEL=info
# Database Configuration (future use)
# DBAL_DB_PATH=/data/dbal.db
# DBAL_DB_POOL_SIZE=10
# Multi-Tenant Configuration (future use)
# DBAL_DEFAULT_QUOTA_BLOB_MB=1024
# DBAL_DEFAULT_QUOTA_RECORDS=100000
# DBAL_DEFAULT_QUOTA_KV_MB=500