Eureka could not find dockerized service
Closed this issue · 1 comments
mnwato commented
Here is eureka_client.init:
eureka_client.init(
eureka_server="http://<EUREKA_SERVER_IP>:8070/eureka",
app_name="<EUREKA_APPNAME>",
instance_port="<API_PORT",
instance_ip="<MACHINE_IP>",
)
At the first my fastapi application registered with docker range ip address (172.19...) in eureka. After setting instance_ip
it registered with my machine ip address but still does not work when loading service from gateway.
Unfortunatly i have not access to eureka server machine.
py-eureka-client 0.11.10
python 3.10
Any help is appriciated
mnwato commented
Solved with bellow eureka client config:
# Eureka client configuration
eureka_client.init(
eureka_server=envs["EUREKA_URL"],
app_name=envs["EUREKA_APPNAME"],
instance_port=int(envs["API_PORT"]),
instance_ip=envs["HOST_IP_ADDRESS"],
instance_host=envs["HOST_IP_ADDRESS"],
renewal_interval_in_secs=5
)