ZOEKT_HOST should be ZOEKT_WEBSERVER_URL instead?
Created by: slimsag
Sourcegraph has a ZOEKT_HOST
environment variable that must be configured properly in all deployments: https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/cmd/frontend/graphqlbackend/search2.go#L375:25
In Kubernetes and single-container Docker deployments, this is done for users already by us. But for the pure-Docker deployment, this needs to be specified, and hence is a user-facing configuration point. I propose deprecating ZOEKT_HOST
and adding ZOEKT_WEBSERVER_URL
instead, which:
- Would support URL
http://indexed-search:80
syntax instead of host-portindexed-search:80
-> Even if only HTTP was supported, the fact that it would be a URL with a scheme would indicate to me what protocol it is communicating over exactly. I tried to use this syntax when I merged https://github.com/sourcegraph/deploy-sourcegraph-docker/commit/ae00d7d6609baafcf5187fea5099f752b0ef263a but it turned out I was wrong about this syntax being supported. - More clearly communicates exactly which service it is talking to (the zoekt webserver service) rather than just "zoekt" (which has two services). I at first was not sure which of the two this connected to, and I had to try both before determining the right one.
- Has no effect on our Kubernetes or single-container Docker users.
This is probably minor, but thoughts @keegancsmith ? Would renaming "zoekt webserver" to "zoekt indexed search" and then naming this "ZOEKT_INDEXED_SEARCH_URL` instead make more sense?