/mongo-replica-set

One click deploy a Mongo Replica Set in Railway

Primary LanguageShellMIT LicenseMIT

Mongo Replica Set with Keyfile Auth

This repo contains the resources required to deploy a Mongo replica set in Railway from a template.

To deploy your own Mongo replica set in Railway, just click the button below!

Deploy on Railway

For even more information, check out the tutorial in Railway: Deploy and Monitor a MongoDB Replica Set

About the MongoDB Nodes

The MongoDB nodes in the replica set are built from the Mongo CE image in Docker Hub. The only customization to the image, is the inclusion of a Keyfile to enable authentication.

About the Init Service

The init service is used to execute the required command against MongoDB to initiate the replica set. Upon completion, it deletes itself via the Railway public API.

Example Apps

Included in this repo are some example apps to demonstrate how to connect to the replica set from a client.

Contributions

Pull requests are welcome. If you have any suggestions for how to improve this implementation of MongoDB replica sets, please feel free to make the changes in a PR.