Skip to content

An example of flask microservices behind Traefik which works as a reverse proxy and load balancer.

Notifications You must be signed in to change notification settings

goldenrati0/flask-with-traefik-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An example of flask microservices behind Traefik which works as a reverse proxy and load balancer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published