Ir al contenido principal

Entradas

Mostrando entradas de marzo, 2018

Creating a Mongo replicaset using docker: Mongo replicaset + Nodejs + Docker Compose

This is a Docker tutorial for creating a Mongo replica set using docker compose and also a couple more containers to experiment with the replica set, above is the vid and below you will find some of the steps followed. Steps Pre-reqs Have node.js installed And docker installed (make sure you have docker-compose as well) Create a container for defining configurations for a mongo instance Create a container for setting up the replica set Create a simple node app using expressjs and mongoose (A modified version from the previous video ) Create a docker-compose file with the mongo and setup containers and two additional containers for experimenting with the replica set Build, Run and experiment with your new containers Create a dockerfile for the first mongo container (not really needed but you could configure more stuff if needed) Include container with mongo preinstalled:  FROM mongo Create default/working directory:  WORKDIR /usr/src/configs Copy mongo