7 months ago
I'm trying to deploy MongoDB 3.2 for a project that I'm trying to bring over to Railway but MongoDB keeps failing to deploy.
I need to upgrade MongoDB, but it's going to be a time consuming process because it's an 8 year old project with Mongoose and a few other pieces that mean it won't be a trivial upgrade.
I'm hoping to be able to just move the deployment over to Railway for now and then work on updating it.
Is there a minimum supported MongoDB version on Railway, or is there some way to configure Railway to deploy the older version? I can't see any logs/debugging about why it's failing to deploy.
I know that MongoDB 3.2 works in Docker because I've been running it locally in Docker.
Attachments
6 Replies
7 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
7 months ago
Hi,
Our official templates only offer a single version of mongodb, however as you mentioned you can get older mongo versions from Docker.
You can create an empty service and attach the docker image for mongodb manually - this will require some manual work to ensure env vars and the correct volume mount path are set, but will allow you to use whatever version you need.
Lmk if this helps!
Best,
Nico
Status changed to Awaiting User Response Railway • 7 months ago
7 months ago
Thanks for the explanation Nico!
I've deployed the mongo:3.2 image as an empty service, connected the MongoDB volume to it and configured all of the required env vars copied from the MongoDB service. My empty service is starting but crashing now which is progress, and I can see some errors in the logs.
The errors seem to be related to connecting to the WiredTiger storage, but I'm not sure what the actual problem is. I'm not sure if you're more familiar with the errors?
It's late here so I'm going to have to leave this for now and pick it up tomorrow.
Status changed to Awaiting Railway Response Railway • 7 months ago
7 months ago
I'm going to push your thread to our bounty board, where our community can assist you with this, as we don't have the bandwidth to help with these questions ourselves 
Status changed to Awaiting User Response Railway • 7 months ago
7 months ago
https://www.mongodb.com/docs/manual/core/wiredtiger/
Looks like google is suggesting to add the flag to your dockerfile start command: --storageEngine=mmapv1
Very unsure about mongo so I'd suggest looking around a bit more. If its not too inconvenient it still looks like upgrading to the latest version is the better choice.
6 months ago
Apologies for taking so long to get back to this. The issue was that I didn't really know what I was doing and I'd attached a volume that was created by the default/modern Railway MongoDB container to my container where I was trying to setup the much older 3.2 MongoDB container. When I created a brand new volume for the older container everything worked as expected. I assume wiping the original volume would have worked too.
Status changed to Solved liow • 6 months ago
