This is a simple script showing communication between docker containers.
Based on this post from Habr
- Install Docker on your PC
- Clone this project on your PC
- Open your terminal in this work dir
- Type:
docker-compose up -d
- Open your browser and go to localhost:5000 for check first container
Hello, I am Tik service!
- Open your browser and go to localhost:5001 for check second container
Hello, I am Tak service!
- Open your browser and go to localhost:5000/tik for check communication between docker containers
Tik ... Tak
- Open your terminal and stop second service:
docker stop tak-service-container
- Now you can repeat point 5 to see: "Tik..." instead of "Tik... Tak"
Tik...