Current Limitation
FOCA's MongoDB registration in foca/database/register_mongodb.py currently only supports individual environment variables (MONGO_HOST, MONGO_PORT, MONGO_USERNAME, MONGO_PASSWORD, MONGO_DBNAME) and constructs the MongoDB URI internally. This prevents users from providing complete MongoDB connection strings with advanced features like:
- Replica sets with multiple hosts
- SRV records
- Custom connection options (SSL, read preferences, etc.)
- Pre-constructed URIs from external secret management
Requested Enhancement
Add support for a MONGO_URI environment variable that, when present, takes precedence over individual component variables while maintaining full backwards compatibility.
Current Limitation
FOCA's MongoDB registration in
foca/database/register_mongodb.pycurrently only supports individual environment variables (MONGO_HOST,MONGO_PORT,MONGO_USERNAME,MONGO_PASSWORD,MONGO_DBNAME) and constructs the MongoDB URI internally. This prevents users from providing complete MongoDB connection strings with advanced features like:Requested Enhancement
Add support for a
MONGO_URIenvironment variable that, when present, takes precedence over individual component variables while maintaining full backwards compatibility.