skip to Main Content

Bootstrapping a mongoDB via docker-compose

Let's say I have the following docker compose that consists of 2 services: a nodeJS app and a mongoDB database that is backing it: version: "3.8" services: mongodb-local: image: mongo:latest restart: unless-stopped env_file: ./.env # see: https://stackoverflow.com/questions/52373098/disable-default-authentication-in-mongo-docker # environment: #…

VIEW QUESTION

Spring Boot can't reach localhost Mongodb

I'm following this example of creating a Spring Boot app that connects with a Mongo DB. However, when I run my application I get: Exception in monitor thread while connecting to server localhost:8081 With the following properties: spring.data.mongodb.uri=mongodb://root:example@localhost:8081/test And the…

VIEW QUESTION
Back To Top
Search