forked from sourcegraph/deploy-sourcegraph-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-zoekt-indexserver.sh
executable file
·34 lines (31 loc) · 1.19 KB
/
deploy-zoekt-indexserver.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
set -e
source ./replicas.sh
# Rename the old ~/sourcegraph-docker/zoekt-shared-disk -> ~/sourcegraph-docker/zoekt-$1-shared-disk
# if it exists. This ensures we don't have to rebuild the search index from scratch.
if [ -e ~/sourcegraph-docker/zoekt-shared-disk ]
then mv ~/sourcegraph-docker/zoekt-shared-disk ~/sourcegraph-docker/zoekt-$1-shared-disk
fi
# Description: Backend for indexed text search operations.
#
# Disk: 200GB / persistent SSD
# Network: 100mbps
# Liveness probe: n/a
# Ports exposed to other Sourcegraph services: 6072/TCP
# Ports exposed to the public internet: none
#
VOLUME="$HOME/sourcegraph-docker/zoekt-$1-shared-disk"
./ensure-volume.sh $VOLUME 100
docker run --detach \
--name=zoekt-indexserver-$1 \
--hostname=zoekt-indexserver-$1 \
--network=sourcegraph \
--restart=always \
--cpus=8 \
--memory=16g \
-e GOMAXPROCS=8 \
-e HOSTNAME=zoekt-webserver-$1:6070 \
-e SRC_FRONTEND_INTERNAL=http://sourcegraph-frontend-internal:3090 \
-v $VOLUME:/data/index \
index.docker.io/sourcegraph/search-indexer:3.15.1@sha256:354ed968e62a7d011b647476a63116813aea23bdada0a2fc4322df5381acb6b3
echo "Deployed zoekt-indexserver $1 service"