Coder Social home page Coder Social logo

docker-mongodb-replicaset's Introduction

MONGODB REPLICASET WITH AUTH,NGINX AS REVERSE PROXY & LOAD BALANCER

These scripts show show to use docker and setup mongodb as a replica set.You can more add more replica sets as your need arises.

Nginx is also used as a reverse proxy and load balance for a sample backend application written in node.js

MONGODB REPLICA SET

We have 3 databases.

All these databases can only be accesed by authenticated accounts. The authenticated account(s) is created on the primary database.

Members in the replica set communicate through a trusted key. Key File

You can modify the docker-compose-scripts/mongo/scripts/setup.sh file to suit your needs.

  • Primary db
  • 2 Secondary dbs

NGINX REVERSE PROXY & LOAD BALANCER

Edit the file ./docker-compose-scripts/nginx/nginx.conf and set your domain name. NOTE:- replace 2246-102-219-249-59.ngrok.io with your domain name

Also change check docker-compose.yml to edit the hostname thus requiring you to edit the same in ./docker-compose-scripts/nginx/nginx.conf

You can then hit the following address for backend without nginx Backend

Backend with nginx Backend NOTE:- replace 2246-102-219-249-59.ngrok.io with your domain name

docker-mongodb-replicaset's People

Contributors

japheth-waswa avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.