Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 1016 Bytes

README.md

File metadata and controls

43 lines (35 loc) · 1016 Bytes

Flask microservices with Traefik example

Deploy Flask microservices with Traefik as reverse proxy and load balancer.

How to run

You need to install docker and docker-compose first.

Clone this repository

git clone https://github.com/goldenrati0/flask-with-traefik-example.git

Change working directory

cd flask-with-traefik-example/

Deploy using docker

docker-compose up -d

Test

Test with curl to verify microservices are running

User Service
curl -H "Host:user.localhost" http://localhost/hello

You should receive a response like

{"msg":"Hello from User Service"}
Payment Service
curl -H "Host:payment.localhost" http://localhost/hello

You should receive a response like

{"msg":"Hello from Payment Service"}

You can browse http://localhost:8080/ to view the Traefik dashboard.