I'm trying to launch app with Docker-compose on windows 10 and connect to my MongoDB 3.4 running on the same machine.
command to launch app: docker-compose -f src/main/docker/app.yml up
I have an application generated from jhipster and this docker config:
version: '2'
services:
core-app:
image: core
environment:
- SPRING_PROFILES_ACTIVE=prod,swagger
- EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka
- SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config
- SPRING_DATA_MONGODB_URI=mongodb://0.0.0.0:27017
- SPRING_DATA_MONGODB_DATABASE=core
- JHIPSTER_SLEEP=10 # gives time for the JHipster Registry to boot before the application
jhipster-registry:
extends:
file: jhipster-registry.yml
service: jhipster-registry
environment:
- SPRING_CLOUD_CONFIG_SERVER_NATIVE_SEARCH_LOCATIONS=file:./central-config/docker-config/
i have an exception:
MongoSocketException: mongodb://0.0.0.0:27017}, caused by {java.net.UnknownHostException: mongodb://0.0.0.0:27017
how to fix this? Any other guides don't work