-
Notifications
You must be signed in to change notification settings - Fork 571
Expand file tree
/
Copy pathdeploy.sh
More file actions
49 lines (41 loc) · 1.46 KB
/
deploy.sh
File metadata and controls
49 lines (41 loc) · 1.46 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
set -e
root_dir="$(dirname "${BASH_SOURCE[0]}")"
cd "$root_dir"
source ./replicas.sh
./teardown.sh
docker network create sourcegraph &>/dev/null || true
./deploy-node-exporter.sh
./deploy-cadvisor.sh
for i in $(seq 0 $(($NUM_GITSERVER - 1))); do ./deploy-gitserver.sh $i; done
./deploy-grafana.sh
./deploy-precise-code-intel-worker.sh
./deploy-syntactic-code-intel-worker.sh
./deploy-pgsql.sh
./deploy-codeintel-db.sh
./deploy-codeinsights-db.sh
./deploy-blobstore.sh
./deploy-prometheus.sh
./deploy-redis-cache.sh
./deploy-redis-store.sh
./deploy-worker.sh
./deploy-otel-collector.sh
for i in $(seq 0 $(($NUM_SEARCHER - 1))); do ./deploy-searcher.sh $i; done
./deploy-syntect-server.sh
for i in $(seq 0 $(($NUM_INDEXED_SEARCH - 1))); do ./deploy-zoekt-indexserver.sh $i; done
for i in $(seq 0 $(($NUM_INDEXED_SEARCH - 1))); do ./deploy-zoekt-webserver.sh $i; done
./deploy-migrator.sh
while [ "$(docker inspect migrator --format '{{.State.Status}}')" != "exited" ]; do
echo "waiting for migrator to complete"
sleep 5
done
# Redis must be started before these.
./deploy-frontend-internal.sh
# Wait for frontend-internal to run migrations before starting remaining frontend containers
while [ "$(docker inspect sourcegraph-frontend-internal --format '{{.State.Health.Status}}')" != "healthy" ]; do
echo "waiting for internal frontend to start"
sleep 5
done
for i in $(seq 0 $(($NUM_FRONTEND - 1))); do ./deploy-frontend.sh $i; done
./deploy-caddy.sh
wait