Files
deploy-sourcegraph-docker/pure-docker/deploy-codeinsights-db.sh
T
Crystal Augustus f5b45da29f CI Test improvements, fixes (#833)
* Don’t exit early if docker ps failed

* Remove temporary sed command used during timescale migration

* Update expected container counts

* Fix missing variable

* Add timeout to docker-compose up command

* Upgrade caddy in 2.5.1

* Add timeout to pure-docker deployment

* Don’t start deployment in preparation to start deployment?
2022-06-23 14:00:28 -04:00

32 lines
975 B
Bash
Executable File

#!/usr/bin/env bash
set -e
# Description: PostgreSQL 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_DB=postgres \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_USER=postgres \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-v $VOLUME:/var/lib/postgresql/data/ \
index.docker.io/sourcegraph/codeinsights-db:3.36.3@sha256:98133abeb1fc6d02ee9f0fca6cc3ab65e2a3a47a07db96a56aa0869389393fce
# Sourcegraph requires PostgreSQL 12+. Generally newer versions are better,
# but anything 12 and higher is supported.
echo "Deployed codeinsights-db service"