Skip to content

Commit b507173

Browse files
authored
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.
1 parent 85d1b86 commit b507173

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docker-compose/docker-compose.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,10 @@ services:
371371
environment:
372372
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
373373
- JAEGER_AGENT_HOST=jaeger
374+
- 'SRC_GIT_SERVERS=gitserver-0:3178'
375+
- 'SEARCHER_URL=http://searcher-0:3181'
376+
- 'SYMBOLS_URL=http://symbols-0:3184'
377+
- 'INDEXED_SEARCH_SERVERS=zoekt-webserver-0:6070'
374378
volumes:
375379
- 'worker:/mnt/cache'
376380
networks:

pure-docker/deploy-worker.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ docker run --detach \
2121
-e GOMAXPROCS=1 \
2222
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
2323
-e JAEGER_AGENT_HOST=jaeger \
24+
-e INDEXED_SEARCH_SERVERS="$(addresses "zoekt-webserver-" $NUM_INDEXED_SEARCH ":6070")" \
25+
-e SEARCHER_URL="$(addresses "http://searcher-" $NUM_SEARCHER ":3181")" \
26+
-e SRC_GIT_SERVERS="$(addresses "gitserver-" $NUM_GITSERVER ":3178")" \
27+
-e SYMBOLS_URL="$(addresses "http://symbols-" $NUM_SYMBOLS ":3184")" \
2428
-v $VOLUME:/mnt/cache \
2529
index.docker.io/sourcegraph/worker:3.36.3@sha256:b4e56f9f2b1dc6c603463b743aca7da9dfeff83677aa271ace5eacf9e70181b4
2630

0 commit comments

Comments
 (0)