Skip to content

Commit 4bab5c8

Browse files
Add migrator to pure-docker deployment (#761)
* Add pure-docker migrator support * Update pure-docker to latest release
1 parent 2c43cdd commit 4bab5c8

25 files changed

+55
-22
lines changed

pure-docker/deploy-cadvisor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sudo docker run --detach \
2424
--volume=/sys:/sys:ro \
2525
--volume=/var/lib/docker/:/var/lib/docker:ro \
2626
--volume=/dev/disk/:/dev/disk:ro \
27-
index.docker.io/sourcegraph/cadvisor:insiders@sha256:90179250038aa47222dc9cea2cf8a9b1b35c3adb01a4bf42fc87b14963c01e91 \
27+
index.docker.io/sourcegraph/cadvisor:3.36.3@sha256:249c573262967979889a186344ba5cc4e8e9186ec4f26c759ce9f8527560da69 \
2828
--port=8080
2929

3030
echo "Deployed cadvisor"

pure-docker/deploy-codeinsights-db.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ docker run --detach \
2020
-e POSTGRES_PASSWORD=password \
2121
-e PGDATA=/var/lib/postgresql/data/pgdata \
2222
-v $VOLUME:/var/lib/postgresql/data/ \
23-
index.docker.io/sourcegraph/codeinsights-db:insiders@sha256:f985af2fef860cc48be40ded864df025b8794b02b86e66cbc6c55bfe3c418831
23+
index.docker.io/sourcegraph/codeinsights-db:3.36.3@sha256:98133abeb1fc6d02ee9f0fca6cc3ab65e2a3a47a07db96a56aa0869389393fce
2424

2525
# Note: You should deploy this as a container, do not try to connect it to your external
2626
# Postgres deployment (TimescaleDB is a bit special and most hosted Postgres deployments

pure-docker/deploy-codeintel-db.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ docker run --detach \
1919
--memory=2g \
2020
-e PGDATA=/var/lib/postgresql/data/pgdata \
2121
-v $VOLUME:/var/lib/postgresql/data/ \
22-
index.docker.io/sourcegraph/codeintel-db:91468_2021-03-30_b77d2e6@sha256:aa937c1c8ab20f3c809f04480d5a73791b05be59d3183726fd499ae0a123e982
22+
index.docker.io/sourcegraph/codeintel-db:3.36.3@sha256:fe3e956733e6ad3599c79d8ca8754249281eb3918aab110e99189cc9b052e28a
2323

2424
# Sourcegraph requires PostgreSQL 12+. Generally newer versions are better,
2525
# but anything 12 and higher is supported.

pure-docker/deploy-frontend-internal.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ docker run --detach \
4040
-e GITHUB_BASE_URL=http://github-proxy:3180 \
4141
-e PROMETHEUS_URL=http://prometheus:9090 \
4242
-v $VOLUME:/mnt/cache \
43-
index.docker.io/sourcegraph/frontend:insiders@sha256:3a77ddb36fb8723d1b81ba422589a5008480f0c99f5f43b447d1e659bb8e915a
43+
index.docker.io/sourcegraph/frontend:3.36.3@sha256:f446e633ea7b536bb1a634267dea2ad1220734e90b7649aa981e9240d39e7e0c
4444

4545
echo "Deployed sourcegraph-frontend-internal service"

pure-docker/deploy-frontend.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ docker run --detach \
4242
-e PROMETHEUS_URL=http://prometheus:9090 \
4343
-v $VOLUME:/mnt/cache \
4444
-p 0.0.0.0:$((3080 + $1)):3080 \
45-
index.docker.io/sourcegraph/frontend:insiders@sha256:3a77ddb36fb8723d1b81ba422589a5008480f0c99f5f43b447d1e659bb8e915a
45+
index.docker.io/sourcegraph/frontend:3.36.3@sha256:f446e633ea7b536bb1a634267dea2ad1220734e90b7649aa981e9240d39e7e0c
4646

4747
# Note: SRC_GIT_SERVERS, SEARCHER_URL, and SYMBOLS_URL are space-separated
4848
# lists which each allow you to specify more container instances for scaling

pure-docker/deploy-github-proxy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ docker run --detach \
2121
-e GOMAXPROCS=1 \
2222
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
2323
-e JAEGER_AGENT_HOST=jaeger \
24-
index.docker.io/sourcegraph/github-proxy:insiders@sha256:8e6c84ba2fb7c1cb03bba5ad0e15d3a655f9e13742e0ffa769391a271f02c562
24+
index.docker.io/sourcegraph/github-proxy:3.36.3@sha256:0b8f2a3d5751bf2e438ce1784be5cac7da19bdca0a25623f03a64a652c8def0d
2525

2626
echo "Deployed github-proxy service"

pure-docker/deploy-gitserver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ docker run --detach \
2323
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
2424
-e JAEGER_AGENT_HOST=jaeger \
2525
-v $VOLUME:/data/repos \
26-
index.docker.io/sourcegraph/gitserver:insiders@sha256:e8ecdc23c106845f37806b40eb762bc9e2f93d6d30a112e5a1ba6c2e46e58ba4
26+
index.docker.io/sourcegraph/gitserver:3.36.3@sha256:8830d2bd6a3ad1fefeb9b7e89471101fa8b3e342b5f0a80cb793985b9017f07b
2727

2828
echo "Deployed gitserver $1 service"

pure-docker/deploy-grafana.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ docker run --detach \
2121
-v $VOLUME:/var/lib/grafana \
2222
-v $(pwd)/../grafana/datasources:/sg_config_grafana/provisioning/datasources \
2323
-v $(pwd)/../grafana/dashboards:/sg_grafana_additional_dashboards \
24-
index.docker.io/sourcegraph/grafana:insiders@sha256:9ea6958ed176855ec33a5a3cc632eae257fd227fa3de1f987d96bf05c7e83d66
24+
index.docker.io/sourcegraph/grafana:3.36.3@sha256:064908bc5848234f2fa4d86f7289af38b707612f90d80008acabe805c27c8a15
2525

2626
# Add the following lines above if you wish to use an auth proxy with Grafana:
2727
#

pure-docker/deploy-jaeger.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ docker run --detach \
2020
-p 0.0.0.0:5778:5778 \
2121
-p 0.0.0.0:6831:6831 \
2222
-p 0.0.0.0:6832:6832 \
23-
index.docker.io/sourcegraph/jaeger-all-in-one:insiders@sha256:1fe9064eadb29dd7d6be754ae831708ba248eb4c907e8bf639dac1d23e8cd3b7 \
23+
index.docker.io/sourcegraph/jaeger-all-in-one:3.36.3@sha256:c95c0f563dfc946b06ff0ce8c7db6d66e62b09a937917d804828bc46503e517b \
2424
--memory.max-traces=20000

pure-docker/deploy-migrator.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
# Description: Performs database migrations
5+
#
6+
# Network: 100mbps
7+
# Liveness probe: n/a
8+
# Ports exposed to other Sourcegraph services: none
9+
# Ports exposed to the public internet: none
10+
#
11+
12+
docker run --detach \
13+
--name=migrator \
14+
--network=sourcegraph \
15+
--restart=on-failure \
16+
--cpus=1 \
17+
--memory=1g \
18+
-e PGHOST=pgsql \
19+
-e PGUSER=sg \
20+
-e CODEINTEL_PGUSER=sg \
21+
-e CODEINTEL_PGHOST=codeintel-db \
22+
-e CODEINSIGHTS_PGDATASOURCE=postgres://postgres:password@codeinsights-db:5432/postgres \
23+
index.docker.io/sourcegraph/migrator:insiders@sha256:38f01f0ac17c04a8c9029444ba9fced0501c6bd75415445c825900efca7bb92c
24+
25+
echo "Deployed migrator service"

0 commit comments

Comments
 (0)