Local development on Ubuntu

I am trying to develop sentry using the instructions on https://develop.sentry.dev/environment/. I am able to successfully start all the containers, but I get stuck with relay trying to connect to the web server.

I had errors with resolving http://host.docker.internal:8000/, which i fixed by getting the ip of the sentry docker network and adding it to the container.start using extra_hosts argument.

After this I get the following error,

2020-11-10T05:34:07Z [relay_server::actors::upstream] ERROR: authentication encountered error: could not send request to upstream
05:34:07 relay   |   caused by: Failed to connect to host: Connection refused (os error 111)
05:34:07 relay   |   caused by: Connection refused (os error 111)
05:34:07 relay   |   caused by: Connection refused (os error 111)

I cannot figure out whats happening.

I ran python http.server 0.0.0.0 9999 and did a wget host.docker.internal:9999
in one of the containers and I can download the page, but wget host.docker.internal:8000 does not work.

I am assuming I need relay to work, if I want to be able to send events to sentry.

Could you please help me understand what I am doing wrong. Thanks a lot.