- Spring Boot
- Spring Cloud Config Server
- Spring Cloud OpenFeign
- Spring Cloud Consul
- Consul - Service Discovery
- Traefik
- Docker
- Docker Compose
- Swagger2, Swagger-UI
- Spring Boot Admin
The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Windows. To achieve inter-service communication between host network and docker network we need to setup a hybrid development environment for microservices with cloud tools.
- Run some services with docker-compose
- Run config-server and run/debug one or more services on your IDE.
- All services automatically join consul catalog and are dynamically configured on traefik.
- Handles inter-service communication via opeinfeign & service discovery
To use this environment you need access privileges;
- docker network to host network by ip
- host network to docker network by ip
By default, host can not access containers' ip addresses on Windows platform.
Alter route table with:
route /P add 172.24.0.0 MASK 255.255.0.0 10.0.75.2
By default, containers can not access host ip address on Linux platform.
Access to host from docker network (Linux/RedHat)
firewall-cmd --permanent --zone=public --add-rich-rule='rule family=ipv4 source address=172.24.0.0/16 accept'
firewall-cmd --reload
Or, you can add route definition.
mvn clean install
mvn jib:dockerBuild
cd ./docker-compose
docker-compose up
docker-compose down --remove-orphans