Open
Description
My user-service config client failed to load configuration from config-service. Initially, I thought the issue was with the config-service, but when I tested it using curl http://localhost:8888/user-microservice/default, it successfully returned data. The problem only occurs when using Docker Compose, whereas everything works fine when running directly in the IDE. Could you provide some insights to help resolve this?
Also, the configurations for both user-service and book-service are stored in a remote repository accessible from config-service server.
That's docker-compose.file:
version: "3.9"
services:
config-service:
build: ./ConfigServer
container_name: config-service
ports:
- "8888:8888"
environment:
- GIT_USERNAME=${GIT_USERNAME}
- GIT_PASSWORD=${GIT_PASSWORD}
networks:
- library-network
discovery-service:
build: ./EurekaServer
container_name: discovery-service
ports:
- "8761:8761"
depends_on:
- config-service
networks:
- library-network
gateway-service:
build: ./API_Gateway
container_name: gateway-service
ports:
- "8090:8090"
depends_on:
- discovery-service
networks:
- library-network
user-service:
build: ./user-microservice
container_name: user-service
ports:
- "8081:8081"
depends_on:
- discovery-service
- config-service
networks:
- library-network
book-service:
build: ./book-microservice
container_name: book-service
ports:
- "8082:8082"
depends_on:
- discovery-service
networks:
- library-network
networks:
library-network:
driver: bridge