stephenhillier / starlette_exporter

Prometheus exporter for Starlette and FastAPI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker host problem

kevinye-2017 opened this issue · comments

I push code in docker.
I got errors return when I curl localhost:8000/metrics from the outside docker
logs output:
curl: (52) Empty reply from server

Inside docker to excute curl command that It can show metrics nomally

How are you running the app inside the container (e.g. Uvicorn)? Can you confirm host is set to 0.0.0.0 (such as in https://fastapi.tiangolo.com/deployment/docker/#dockerfile)? Do you get a successful response from other endpoints?

I assume you've found a solution; please re-open if still having an issue. 👍