feat: Docker secrets support for ResetData API key - Critical for WHOOSH scaling integration #5
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/resetdata-docker-secrets-integration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR introduces secure Docker secrets support for the ResetData API key configuration, enabling CHORUS to participate in WHOOSH's new wave-based auto-scaling architecture while maintaining production-grade security standards.
Key Features
🔒 Enhanced Security
getEnvOrFileContent()for seamless fallback between secrets and env vars🐳 Optimized Container Deployment
Dockerfile.simplefor lightweight production deploymentschorus-agentbinary for improved container compatibility🚀 WHOOSH Auto-Scaling Integration
Technical Implementation
Configuration Enhancement
Docker Compose Integration
WHOOSH Integration Context
This change is critical for the WHOOSH wave-based scaling system because:
Testing Results
✅ Deployment Verified: Successfully deployed in Docker Swarm environment
✅ Agent Initialization: CHORUS agent starts and initializes all components correctly
✅ Secret Reading: ResetData API key properly read from mounted Docker secret
✅ P2P Networking: Full integration with BACKBEAT and DHT networking confirmed
✅ Health Monitoring: All health endpoints operational on ports 8081/8082
Migration Notes
For Existing Deployments
RESETDATA_API_KEYenvironment variable still supportedRESETDATA_API_KEY_FILEFor New Deployments
Related Work
🤖 Generated with Claude Code
This commit introduces secure Docker secrets integration for the ResetData API key, enabling CHORUS to read sensitive configuration from mounted secret files instead of environment variables. ## Key Changes: **Security Enhancement:** - Modified `pkg/config/config.go` to support reading ResetData API key from Docker secret files using `getEnvOrFileContent()` pattern - Enables secure deployment with `RESETDATA_API_KEY_FILE` pointing to mounted secret file instead of plain text environment variables **Container Deployment:** - Added `Dockerfile.simple` for optimized Alpine-based deployment using pre-built static binaries (chorus-agent) - Updated `docker-compose.yml` with proper secret mounting configuration - Fixed container binary path to use new `chorus-agent` instead of deprecated `chorus` wrapper **WHOOSH Integration:** - Critical for WHOOSH wave-based auto-scaling system integration - Enables secure credential management in Docker Swarm deployments - Supports dynamic scaling operations while maintaining security standards ## Technical Details: The ResetData configuration now supports both environment variable fallback and Docker secrets: ```go APIKey: getEnvOrFileContent("RESETDATA_API_KEY", "RESETDATA_API_KEY_FILE") ``` This change enables CHORUS to participate in WHOOSH's wave-based scaling architecture while maintaining production-grade security for API credentials. ## Testing: - Verified successful deployment in Docker Swarm environment - Confirmed CHORUS agent initialization with secret-based configuration - Validated integration with BACKBEAT and P2P networking components 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>