meteor mongo -U shows me mongodb://127.0.0.1:3001/meteor as the connection string. I understand that the docker image will try to connect to itself and fail. I tried substituting 127.0.0.1 for any IP address I could find when running ifconfig with the same result: { [MongoError: connect ECONNREFUSED xxx.xxx.xxx.xxx:3001] name: ‘MongoError’, message: ‘connect ECONNREFUSED xxx.xxx.xxx.xxx:3001’ } Not […]

I have a local mongoDB server running on mongodb://127.0.0.1:27017. My DB name is localv2. I have a node/express app with the Dockerfile as follows: FROM node:7.5 RUN npm install -g pm2 RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY package.json /usr/src/app RUN npm install COPY . /usr/src/app EXPOSE 3002 ENV NODE_ENV local CMD pm2 start –no-daemon […]

I’ve just been introduced to Docker and the concept is awesome. I’ve found simple Dockerfiles for building an image for MongoDB and Node and was wondering, do I just combine those images together to make one image that has my project which is a combination of a custom Node app (built on Express), a NodeBB […]

I am building a project with 3 docker. API with Rails Website angular / webpack DB with mongodb So i have a docker-compose to handle everything. My problem is when i want to seed my database, i have an error : Mongo::Error::NoServerAvailable: No server is available matching preference: #<Mongo::ServerSelector::Primary:0x47121755943460 tag_sets=[] server_selection_timeout=30 local_threshold=0.015> I tried many […]

I want to create a Docker image that starts a mongo server and automatically restores from a previous mongodump on startup. Here is my Dockerfile for the image: FROM mongo COPY dump /home/dump CMD mongorestore /home/dump When I run this, I run into this error: Failed: error connecting to db server: no reachable servers Is […]

I want to run a node app that uses express and connects to a (boot2docker) docker mongo container. When I first wrote the app, I was using a locally installed instance of mongodb, and the following config worked: module.exports = { env: ‘development’, mongo: { uri: ‘mongodb://localhost/fullstack-dev’ } }; And it ran as expected. Now […]