Tag: mongodb

passing arguments to docker exec from bash prompt and script

I am trying to execute a command inside my mongodb docker container. From my linux command prompt it is pretty easy and works when I do this docker exec -it d886e775dfad mongo –eval ‘rs.isMaster()’ The above tells me to go to a container and execute the command “mongo –eval ‘rs.isMaster()’ – This tells mongo to […]

PyMongo and Django

I’m new to Django and I’m making a Django app where I’m supposed to use MySQL and MongoDB through py-mongo. (I’m trying to use only py-mongo, not with mongoengine) I created an app ‘test-app’ with a model ‘Books’ and a CRUD views which seem to work fine (all books are saved and retrieved). However, for […]

Why dockerized mongo drops my database periodically?

I got a little web-service. On the back-end I got dockerized mongo and a few casual stuff like nodejs & nginx. Everything in separate container. And communicates via virtual network. So my web-service is working few months. And during this time my database has been dropped twice. But I haven’t even committed any changes. Mongo […]

How can I make my nodeJS container connect with my mongoDB container?

I have 2 fairly simple Docker containers, 1 containing a NodeJS application, the other one is just a MongoDB container. Dockerfile.nodeJS FROM node:boron ENV NODE_ENV production # Create app directory RUN mkdir -p /node/api-server WORKDIR /node/api-server # Install app dependencies COPY /app-dir/package.json /node/api-server/ RUN npm install # Bundle app source COPY /app-dir /node/api-server EXPOSE 3000 […]

Nodejs application not running by using docker compose

I’m dockerizing nodejs and mongoDB application but its not executing into browser. URL is Error in browser: This site can’t be reached The connection was reset. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_RESET By executing this command: docker-compose up –build It will generates following output into ubuntu terminal. web_1 | […]

How to create a MongoDB docker and save the DB's configuration?

I pretty new with dockers and started to play with it during my last project. I have a MongoDB container which I wish to move between some machines during the development. I have some questions regards it- Is there an option to copy-paste all the DB data? Mean that when I copy the image container […]

Authenticating into Mongodb docker container

How to use authentication in Mongodb docker container? Create user and use that user authentication in Mongodb containers While using Mongodb and Python flask application, we want to secure mongodb container with perticular username and password.

Deploying mean stack application to my server [closed]

I’m a total beginner in deployement process and i want to deploy my MEAN stack application to my hosted server running on linux , Nothing tried yet but heard about Docker.

How to create new databases and collections when using MongoDB with Docker?

I’m pretty new with Dockers and now practiced with initializing new MongoDB container using docker-compose. I’ve learned that inserting environment variables into the Dockerfile will create for me an admin user and set a password. I also found that I can pass the docker a js file that will process some commands and create for […]

gitlab-ci-multi-runner 9.2.0: ERROR: Job failed: exit code 252

I am running my tests inside a docker image on a docker gitlab executor. The logs are looking like this: Running with gitlab-ci-multi-runner 9.2.0 . . <after_script called> ERROR: Job failed: exit code 252 The last thing I am doing in my job script (shell) is a call to mongo eval My after_script for this […]

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