Pinned Solution
2 months ago
Hey so I was able to reproduce the connection issue: Looks like your still running mango on your localhost:8080. I'd recommend just using a MongoDB service. Here are the steps laid out for you:
-
Add a MongoDB service to your project — New → Database → Add MongoDB — or use an external provider such as Atlas.
-
On your
vortex-leads-apiservice, open Variables and add:MONGODB_URI=${{MongoDB.MONGO_URL}}Replace
MongoDBwith your Mongo service's actual name. -
Redeploy
vortex-leads-api. Your normal startup log should appear with no connection error.
This will be much more reliable then trying to passing a connection string, referencing your Mongo service with environment variables is also much more consistant. If you have to use a self-hosted Mongo container let me know and I'll pass you a update once I reproduce it.
Hope this helps,
Best Regards :)
6 Replies
2 months ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 2 months ago
Status changed to Solved propackmarocpp-bit • 2 months ago
Status changed to Awaiting Railway Response Railway • 2 months ago
Status changed to Awaiting User Response Railway • 2 months ago
propackmarocpp-bit

2 months ago
Problem connect MONGODB_URI
URL problem password 🔑 problem help me please 🥺
Status changed to Awaiting Railway Response Railway • 2 months ago
2 months ago
Looks like you're trying to connect to localhost instead of mongo private url, make sure you define variable for mongo url and use the private url of your mongo service, how is your current setup?
Status changed to Awaiting User Response Railway • 2 months ago
mayori
Looks like you're trying to connect to localhost instead of mongo private url, make sure you define variable for mongo url and use the private url of your mongo service, how is your current setup?
2 months ago
Attachments
Status changed to Awaiting Railway Response Railway • 2 months ago
Status changed to Open brody • 2 months ago
2 months ago
Hey so I was able to reproduce the connection issue: Looks like your still running mango on your localhost:8080. I'd recommend just using a MongoDB service. Here are the steps laid out for you:
-
Add a MongoDB service to your project — New → Database → Add MongoDB — or use an external provider such as Atlas.
-
On your
vortex-leads-apiservice, open Variables and add:MONGODB_URI=${{MongoDB.MONGO_URL}}Replace
MongoDBwith your Mongo service's actual name. -
Redeploy
vortex-leads-api. Your normal startup log should appear with no connection error.
This will be much more reliable then trying to passing a connection string, referencing your Mongo service with environment variables is also much more consistant. If you have to use a self-hosted Mongo container let me know and I'll pass you a update once I reproduce it.
Hope this helps,
Best Regards :)
brezzy1337
Hey so I was able to reproduce the connection issue: Looks like your still running mango on your localhost:8080. I'd recommend just using a MongoDB service. Here are the steps laid out for you: 1. Add a MongoDB service to your project — **New → Database → Add MongoDB** — or use an external provider such as Atlas. 2. On your `vortex-leads-api` service, open **Variables** and add: ``` MONGODB_URI=${{MongoDB.MONGO_URL}} ``` Replace `MongoDB` with your Mongo service's actual name. 3. Redeploy `vortex-leads-api`. Your normal startup log should appear with no connection error. This will be much more reliable then trying to passing a connection string, referencing your Mongo service with environment variables is also much more consistant. If you have to use a self-hosted Mongo container let me know and I'll pass you a update once I reproduce it. Hope this helps, Best Regards :)
2 months ago
Thank you for help 🙏🙏🙏🙏
Status changed to Solved brody • 2 months ago
