mirror of
https://github.com/RustyRaptor/deploy-sourcegraph-docker.git
synced 2026-12-04 16:25:18 -07:00
28 lines
858 B
Bash
Executable File
28 lines
858 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-12.6:91468_2021-03-30_b77d2e6@sha256:aa937c1c8ab20f3c809f04480d5a73791b05be59d3183726fd499ae0a123e982
|
|
|
|
# Sourcegraph requires PostgreSQL 12+. Generally newer versions are better,
|
|
# but anything 12 and higher is supported.
|
|
|
|
echo "Deployed pgsql service"
|