Category : mongodb

I’m trying to configure a mongos router through docker, that I’ll then connect to, from my localhost. While configuring the mongos router, I’m using mongos –config <path to file> to specify my config file Dockerfile FROM mongo:4.4.4 COPY mongos.conf /etc/mongos.conf # TLS CA Root file COPY ca.crt /etc/mongodb/ssl/ca.crt # TLS Certificate key file COPY cert.pem ..

Read more

I have an Amazon EC2 instance already running my Docker container containing my MongoDB and Apache Maven backend code. The Docker container is successfully running on port 80, and queries to it are working. I’m trying to set up Nginx as well to load my React generated index.html from "npm run build". However, Nginx cannot ..

Read more

As I’m introducing authentication for my MongoDB instance in Docker, I ran into problems which are probably related to the way agenda.js tries to connect to MongoDB, as the connection string invokes successful logs for mongoose connecting to the DB, therefore I assume the string should be valid. Everything worked until I changed the connection ..

Read more

I am having this error while running my docker- compose command "docker-compose up -d mongo". Please help me to find a solution . Thanks in advance . My docker-compose.yml looks like this . version: ‘3’ services: mongo: image: mongo:4.2.0 ports: – "27017:27017" volumes: – mongodb:/data/db – mongodb_config:/data/configdb mongo-express: image: mongo-express restart: unless-stopped ports: – "8081:8081" ..

Read more

I am tyring to create a mongodb container with following command: docker run -dit –rm -p 27017:27017 –name mongo-docker mongo:latest I am getting this error when I’m running the command: docker: (Image hash)Error response from daemon: driver failed programming external connectivity on endpoint mongo-docker: Error starting userland proxy: listen tcp4 0.0.0.0:27017: bind: address already in ..

Read more

I have a server code written in golang that listen to http and connecting to mongodb at localhost:27017 at my development machine and on aws ec-2 instance also the same host. All is working well when I run it via go run main.go. sudo docker build -t server /mnt/c/code/tttfm/backend/server returns => [internal] load build definition ..

Read more

I used to run mongodb in docker with this config ~/project/.env file is # Mongodb common config CONFIG_MONGODB_PORT=27020 CONFIG_MONGODB_PREFIX=mongodb:// CONFIG_MONGODB_AUTH_ENABLED=true CONFIG_MONGODB_USERNAME=alok CONFIG_MONGODB_PASSWORD=alokm CONFIG_MONGODB_AUTH_SOURCE=admin ~/project/docker-compose.yml file is version: ‘3.4’ mongodb: image: mongo:4.0.3 restart: unless-stopped command: mongod –port ${CONFIG_MONGODB_PORT} volumes: – ${HOST_MONGODB_DATA}:/data/db ports: – 5010:${CONFIG_MONGODB_PORT} expose: – ${CONFIG_MONGODB_PORT} environment: MONGO_INITDB_ROOT_USERNAME: ${CONFIG_MONGODB_USERNAME} MONGO_INITDB_ROOT_PASSWORD: ${CONFIG_MONGODB_PASSWORD} To run mongodb sudo ..

Read more