Pinned Solution
a month 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
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 28 days ago
Status changed to Solved propackmarocpp-bit • 28 days ago
Status changed to Awaiting Railway Response Railway • 28 days ago
Status changed to Awaiting User Response Railway • 28 days ago
propackmarocpp-bit

a month ago
Problem connect MONGODB_URI
URL problem password 🔑 problem help me please 🥺
Status changed to Awaiting Railway Response Railway • 28 days ago
a month 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 • 28 days 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?
a month ago
Attachments
Status changed to Awaiting Railway Response Railway • 26 days ago
Status changed to Open brody • 26 days ago
a month 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 :)
25 days ago
Thank you for help 🙏🙏🙏🙏
Status changed to Solved brody • 21 days ago
