This is a Docker demonstration of Sōzu, the ✨ reverse proxy raised at Clever-Cloud. You cand find more informations about Sōzu here:
- Install Docker
- Install Docker-compose
- Clone this repository:
git clone git@github.com:k33g/sozu-vagrant-demo.git
cd sozu-docker-demo
docker-compose up
It could be lonf, so ... ☕️ or ☕️
Now you should have 7 virtual machines:
webapp1 172.20.0.11:8080
webapp2 172.20.0.12:8080
webapp3 172.20.0.13:8080
webapp_new1 172.20.0.21:8080
webapp_new2 172.20.0.22:8080
webapp_new3 172.20.0.23:8080
sozuapp 172.20.0.00:8080
- the containers 1, 2 and 3 contain an Express web application (the same, but with a name generated at run time)
- the containers 4, 5 and 6 contain the version 2 of the Express web application
- the last VM contains the Sōzu reverse proxy
- the ip of Sōzu is
172.20.0.99
and listen on8080
- I added this in my
hosts
file172.20.0.99 sozu.local
- then now, you'll connect to it with http://sozu.local:8080/
- the ip of Sōzu is
docker exec sozudockerdemo_sozu_1 /sozuctl --config /demo/demo.toml backend remove --id webapp --ip 172.20.0.11 --port 8080
docker exec sozudockerdemo_sozu_1 /sozuctl --config /demo/demo.toml backend remove --id webapp --ip 172.20.0.12 --port 8080
docker exec sozudockerdemo_sozu_1 /sozuctl --config /demo/demo.toml backend remove --id webapp --ip 172.20.0.12 --port 8080
docker exec sozudockerdemo_sozu_1 /sozuctl --config /demo/demo.toml backend add --id webapp --ip 172.20.0.21 --port 8080
docker exec sozudockerdemo_sozu_1 /sozuctl --config /demo/demo.toml backend add --id webapp --ip 172.20.0.22 --port 8080
docker exec sozudockerdemo_sozu_1 /sozuctl --config /demo/demo.toml backend add --id webapp --ip 172.20.0.23 --port 8080
You can read these 2 🇫🇷 blog posts: