I have been writing this awesome Express & MongoDB app, 1: https://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
The Docker file is as follows:
COPY package.json /app
RUN npm install
COPY . /app
CMD node app.js
The docker-compose.yml file.
The docker image can be found on docker hub using this link:
docker pull sparatan/oober_app
Any suggestions would be appreciated.