First create two images :
docker image build -t employee-consumer .
docker image build -t employee-producer .
docker-compose.yml
version: "3"
services:
consumer:
image: employee-consumer
container_name: employee-consumer-c
networks:
consumer-producer-net
depends_on:
producer
producer:
image: employee-producer
container_name: employee-consumer-p
ports:
"8080:8081"
networks:
consumer-producer-net
networks:
consumer-producer-net:
Comand to run - docker-compose up
http:localhost:8082/cdata - consumer called the producer for data and you will get the result
On this page of the site you can watch the video online Docker For Java Developer : Deploying Multiple Spring Boot Microservices using Docker Compose with a duration of online in good quality, which was uploaded by the user Coder Baba 27 February 2023, share the link with friends and acquaintances, this video has already been watched 2,070 times on youtube and it was liked by like viewers. Enjoy your viewing!