Replies: 1 comment
|
There are two different address spaces being mixed here. Inside each service container, Uvicorn/Traefik targets port 8000. Host mappings such as 8001/8002/8003 (if defined in an override file) exist only on the Docker host. Therefore these health checks are wrong inside the containers: user-service:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/users/utils/health-check/"]
product-service:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/products/utils/health-check/"]
order-service:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/orders/utils/health-check/"]For container-to-container calls use service DNS names and the container port, e.g. The observed
Your Traefik service target |
Uh oh!
There was an error while loading. Please reload this page.
First Check
Commit to Help
Example Code
Description
https://github.com/sivajik34/FastCart
I'm trying to add micro services user_service order_service product_service and getting port issues.
below 3 are working
http://localhost:8001/users/docs#/
http://localhost:8002/products/docs#/
http://localhost:8003/orders/docs#/
but from frontend it is not working http://localhost:8000/users/users/me net::ERR_CONNECTION_REFUSED
it seems I'm not able to configure api gateway.
can you help me on this
Operating System
Windows
Operating System Details
windows
Python Version
python 3.12
Additional Context
No response
All reactions