Tag: mongodb

How to setup a valid mongo replicaset

I would like to study a scenario that there are several MongoDB in replica mode but in a special case, there is only one working. My configuration is like following. I have a MongoDB container on an EC2 instance, my command is sudo docker run \ –name mongo \ -v /home/core/mongo-files/data:/data/db \ -p 27018:27017 -d […]

Error mounting volumes on Openshift (Next gen)

I’m testing the new Openshift platform based on Docker and Kubernetes. I’ve created a new project from scratch, then when I try to deploy a simple MongoDB service (as well with a python app), I got the following errors in the Monitoring section in Web console: Unable to mount volumes for pod “mongodb-1-sfg8t_rob1(e9e53040-ab59-11e6-a64c-0e3d364e19a5)”: timeout expired […]

Unable to start mongodb using supervisor file

I’ve got a docker container, in which I’m installing mongo db. After installing, I’m trying to start mongo and restore a mongo db dump. However, when I start the docker instance, I see that the user has been switched to root (as per supervisor instruction) but mongo is not started. This is the supervisor snippet: […]

Symfony MongoId Class not found error

I am using Symfony3 and I have used mongo db in my application. I have include the following in my composer.json file “doctrine/mongodb-odm”: “^1.0@dev”, “doctrine/mongodb-odm-bundle”: “^3.0@dev”, I have tried couple of solutions from internet but following error is coming Fatal error: Class ‘MongoId’ not found in /var/www/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Id/AutoGenerator.php on line 34 Please if any one can […]

How to setup environments for MERN apps

Background My friends and I are developers using MacOS and different Linux distributions. (Luckily we don’t have one using Windows) We would like to develop Mobile Apps using MERN (MongoDB, Express, React (Native with Redux) and NodeJS). We think that by using Docker, we could test our code without needing every dev running a lot […]

Unable to Connect From Dockerized Node Program to Localhost Mongodb

I am able to npm start the code from cmd and have it running with mongodb but docker build the code and docker run it generates this error: /usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/server.js:265 process.nextTick(function() { throw err; }) ^ MongoError: failed to connect to server [] on first connect at null.<anonymous> (/usr/src/app/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:325:35) at emitOne (events.js:77:13) at emit (events.js:169:7) at […]

Implementing MongoDB in AWS EC2 Container Service

I need to implement MongoDB in Amazon’s AWS EC2 Container Service and I have no clue how to start with it, there’s little or none documentation about it and I was wondering if anyone of you has already faced the same problem and maybe we can share some solutions. Thanks in advance 🙂

Docker + MongoDB: How to view database with RoboMongo?

How can I access the mongo database that created by Docker using RoboMongo or something similar? Before using Doncker, I have already install mongodb into my Linux machine. So I can’t use the port “27017:27017” in the docker-compse.yml. I use “27018:27018”: version: “2” services: web: build: . ports: – “3000:3000” links: – mongo mongo: image: […]

What is the right way to deploy Node/Express/Mongo/React app with Docker?

I have built an app using Node/Express/Mongo on the backend and React/Redux on the frontend. Now I am trying to figure out how to properly deploy this app using Docker. Can you give me some advice on how to do this correctly? Should I have 3 containers, one for node, one for mongo, and one […]

Connection refused by Docker container

I’ve struggled with this for quite some time. I have a Django application and I’m trying to package it into containers. The problem is that when I publish to a certain port (8001) the host refuses my connection. $ docker-machine ip default When I try to curl or reach by browser, the connection […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.