Files
deploy-sourcegraph-docker/pure-docker/deploy-worker.sh
T

33 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 GITHUB_BASE_URL=http://github-proxy:3180 \
-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:insiders@sha256:db428aa8602142005970708a6211b395c0798cf0b1ef1f40530860990ea2b1f9
echo "Deployed worker service"