Files
deploy-sourcegraph-docker/pure-docker/deploy-worker.sh
T
Camden Cheek b507173c1d 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.
2022-03-02 11:23:25 -07:00

32 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
source ./replicas.sh
# Description: Manages background processes.
#
# Disk: 128GB / non-persistent SSD
# Network: 100mbps
# Liveness probe: n/a
# Ports exposed to other Sourcegraph services: 3189/TCP 6060/TCP
# Ports exposed to the public internet: none
#
VOLUME="$HOME/sourcegraph-docker/worker-disk"
./ensure-volume.sh $VOLUME 100
docker run --detach \
--name=worker \
--network=sourcegraph \
--restart=always \
--cpus=4 \
--memory=4g \
-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
echo "Deployed worker service"