mirror of
https://github.com/RustyRaptor/deploy-sourcegraph-docker.git
synced 2026-12-03 15:55:17 -07:00
32 lines
977 B
Bash
Executable File
32 lines
977 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:insiders@sha256:f9ec6c4ad49034945b6257355e38d402235f5a2220ca5a6ba84f154f2366c3e9
|
|
|
|
# Sourcegraph requires PostgreSQL 12+. Generally newer versions are better,
|
|
# but anything 12 and higher is supported.
|
|
|
|
echo "Deployed codeinsights-db service"
|