Files
deploy-sourcegraph-docker/pure-docker/deploy-codeinsights-db.sh
T
Robert Lin 76ea424bd2 pure-docker: move pure-docker to ./pure-docker (#454)
This change will require additional actions for users using the pure-docker deployment option upgrading past 3.30.x - Please refer to https://docs.sourcegraph.com/admin/updates/pure_docker for more details.
2021-07-25 20:34:38 +08:00

31 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
# Description: TimescaleDB time-series database for code insights data.
#
# Disk: 128GB / persistent SSD
# Network: 1Gbps
# Liveness probe: 5432/TCP
# Ports exposed to other Sourcegraph services: 5432/TCP 9187/TCP
# Ports exposed to the public internet: none
#
VOLUME="$HOME/sourcegraph-docker/codeinsights-db-disk"
./ensure-volume.sh $VOLUME 999
docker run --detach \
--name=codeinsights-db \
--network=sourcegraph \
--restart=always \
--cpus=4 \
--memory=2g \
-e POSTGRES_PASSWORD=password \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-v $VOLUME:/var/lib/postgresql/data/ \
index.docker.io/sourcegraph/codeinsights-db:insiders@sha256:f985af2fef860cc48be40ded864df025b8794b02b86e66cbc6c55bfe3c418831
# Note: You should deploy this as a container, do not try to connect it to your external
# Postgres deployment (TimescaleDB is a bit special and most hosted Postgres deployments
# do not support TimescaleDB, the data here is akin to gitserver's data, where losing it
# would be bad but it can be rebuilt given enough time.)
echo "Deployed codeinsights-db service"