mirror of
https://github.com/RustyRaptor/deploy-sourcegraph-docker.git
synced 2026-12-04 00:05:19 -07:00
* pure-docker: add codeinsights-db * test: add codeinsights-db permissions Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com> * prometheus: add codeinsights-db (optional) Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com> * docker-compose: add codeinsights-db Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com> * test: update expected # of containers Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
31 lines
1.1 KiB
Bash
Executable File
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"
|