DEVOPS Express and Mongo Docker Container Networking

0 votes

I have been writing this awesome Express & MongoDB app, 1https://github.com/mwaz/oober-bck, everything is working perfectly offline, I have different DB configurations for different application environments e.g, development, staging, testing, and production, in the real sense in every environment, the DB is different and given MongoDB is flexible, we do not have a problem with that.

Since the Application is working normally by setting the $NODE_ENV variable to the application environment required on my local machine, everything should work fine when the application is dockerized, but this is not the case, the MongoDB crashes at some point and does not connect to the application, here is the sample log Docker Log, when running docker-compose up

The Docker file is as follows:

FROM node:7
WORKDIR /app
COPY package.json /app
RUN npm install
COPY . /app
CMD node app.js
EXPOSE 3003

The docker-compose.yml file.

version: "2"
services:
  app:
    container_name: oober
    restart: always
    build: .
    ports:
      - "3003:3003"
    environment:
      - NODE_ENV=STAGING
    links:
      - mongo
  mongo:
    container_name: mongo
    image: mongo
    ports:
      - "27017:27017"

The docker image can be found on docker hub using this link:

docker pull sparatan/oober_app
Any suggestions would be appreciated.
Apr 1, 2022 in Other DevOps Questions by Kichu
• 19,050 points
315 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Other DevOps Questions

+3 votes
6 answers

Devops and security

By using tools that are shared across the ...READ MORE

answered Oct 23, 2018 in Other DevOps Questions by Anvit
1,444 views
0 votes
1 answer

Is CCNA a big plus while applying for a DevOps job because networking knowledge comes in handy?

Hii amit, Actually now a days Cloud Computing is a ...READ MORE

answered Apr 20, 2020 in Other DevOps Questions by Niroj
• 82,880 points
2,365 views
0 votes
1 answer
0 votes
1 answer

Create an automatic PR and complete it Azure DevOps

You can retrieve the creator ID after ...READ MORE

answered Feb 9, 2022 in Other DevOps Questions by Bhavitha
• 1,000 points
1,980 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,090 points
2,471 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP