mirror of
https://github.com/RustyRaptor/deploy-sourcegraph-docker.git
synced 2026-12-04 08:15:24 -07:00
28 lines
842 B
Bash
Executable File
28 lines
842 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# Description: PostgreSQL database for various data.
|
|
#
|
|
# Disk: 128GB / persistent SSD
|
|
# Network: 100mbps
|
|
# 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/pgsql-disk"
|
|
./ensure-volume.sh $VOLUME 999
|
|
docker run --detach \
|
|
--name=pgsql \
|
|
--network=sourcegraph \
|
|
--restart=always \
|
|
--cpus=4 \
|
|
--memory=2g \
|
|
-e PGDATA=/var/lib/postgresql/data/pgdata \
|
|
-v $VOLUME:/var/lib/postgresql/data/ \
|
|
index.docker.io/sourcegraph/postgres-11.4:3.21.1@sha256:a55fea6638d478c2368c227d06a1a2b7a2056b693967628427d41c92d9209e97
|
|
|
|
# Sourcegraph requires PostgreSQL 9.6+. Generally newer versions are better,
|
|
# but anything 9.6 and higher is supported.
|
|
|
|
echo "Deployed pgsql service"
|