ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
738 stars 134 forks source link

"server --local" behavior in Hoogle 5 interacts badly with Docker hosting #189

Open jwiegley opened 7 years ago

jwiegley commented 7 years ago

I have dockerized a local Hoogle server container, available here:

https://hub.docker.com/r/jwiegley/hoogle-local/

With Hoogle 4, this works perfectly fine. But with Hoogle 5, the port forwarding no longer works correctly. The thing is, I access the website using http://127.0.0.1:8687 from my machine, but it's not actually a localhost access from the point of view of Hoogle. So with Hoogle 5 I need to add --host, however, this changes the behavior somewhat:

As a result, there is no combination that works anymore for Dockerized hoogle-local. This would work if --local --host '*' adds file/ leaders within documentation pages, as well as within search results.

jwiegley commented 7 years ago

@ndmitchell Hi Neil, any ideas on this one? I'd love to update my Docker image on DockerHub, but this bug is blocking the update. For now, I've just switch to using Hoogle directly again, since that continues to work.

ndmitchell commented 7 years ago

Sorry for the delay in replying - I've been swamped with other stuff and not had much time on the internet.

I'm confused. Can you trigger this behaviour outside Docker? Does the --host '*' actually make any meaningful difference to how files are served? Can you give a concrete example? As my test case I searched for filter, then clicked on the Bool in the type signature and ended up at the right documentation. With Hoogle 5 I don't write any links, I just use the fact they are relative links and start by serving them up under file/ which gets preserved.