I’m trying to connect to a remote mongodb setup on Atlas from a local run.
I have a normal mongo url from compose:
MONGO_URL=mongodb://[username]:[password]@aws-us-east-1-portal.21.dblayer.com:10170/[database]
This works fine for remote connection on local runs and for deployment to Galaxy.
I have made a more complex replica set setup with Atlas and would like to connect to that database set from local development and in production.
The Atlas url looks like this:
MONGO_URL=mongodb://[username]:[password]@cluster0-shard-00-00-xgnuk.mongodb.net:27017,cluster0-shard-00-01-xgnuk.mongodb.net:27017,cluster0-shard-00-02-xgnuk.mongodb.net:27017/[database]?ssl=true&replicaSet=Cluster0-shard-0&readPreference=primaryPreferred&w=majority&authSource=admin
When I deploy to Galaxy, my app connects successfully to the desired Atlas database. However, when I try to set the url locally to the remote database, like I use to with the compose url, my local app instance only connects to my local mongodb with no warnings or errors.
I tried playing around with the option settings in the url, but with no success. Any ideas how I can achieve this?
(No sharding is enabled)