From b507173c1d87f99506aadf2847df1f924c75ff10 Mon Sep 17 00:00:00 2001 From: Camden Cheek Date: Wed, 2 Mar 2022 11:23:25 -0700 Subject: [PATCH] add env vars for searching in worker (#773) This adds the necessary environment variables to execute searches from worker directly. These variables are copied from the corresponding frontend configurations. --- docker-compose/docker-compose.yaml | 4 ++++ pure-docker/deploy-worker.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docker-compose/docker-compose.yaml b/docker-compose/docker-compose.yaml index de6e688..244eb7c 100644 --- a/docker-compose/docker-compose.yaml +++ b/docker-compose/docker-compose.yaml @@ -371,6 +371,10 @@ services: environment: - 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090' - JAEGER_AGENT_HOST=jaeger + - 'SRC_GIT_SERVERS=gitserver-0:3178' + - 'SEARCHER_URL=http://searcher-0:3181' + - 'SYMBOLS_URL=http://symbols-0:3184' + - 'INDEXED_SEARCH_SERVERS=zoekt-webserver-0:6070' volumes: - 'worker:/mnt/cache' networks: diff --git a/pure-docker/deploy-worker.sh b/pure-docker/deploy-worker.sh index cc705da..361cc9f 100755 --- a/pure-docker/deploy-worker.sh +++ b/pure-docker/deploy-worker.sh @@ -21,6 +21,10 @@ docker run --detach \ -e GOMAXPROCS=1 \ -e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \ -e JAEGER_AGENT_HOST=jaeger \ + -e INDEXED_SEARCH_SERVERS="$(addresses "zoekt-webserver-" $NUM_INDEXED_SEARCH ":6070")" \ + -e SEARCHER_URL="$(addresses "http://searcher-" $NUM_SEARCHER ":3181")" \ + -e SRC_GIT_SERVERS="$(addresses "gitserver-" $NUM_GITSERVER ":3178")" \ + -e SYMBOLS_URL="$(addresses "http://symbols-" $NUM_SYMBOLS ":3184")" \ -v $VOLUME:/mnt/cache \ index.docker.io/sourcegraph/worker:3.36.3@sha256:b4e56f9f2b1dc6c603463b743aca7da9dfeff83677aa271ace5eacf9e70181b4