Files
deploy-sourcegraph-docker/docker-compose
Stephen Gutekanst 299827ec9d insights: set PGDATA=/var/lib/postgresql/data/pgdata (#269)
I previously thought `PGDATA=/var/lib/postgresql/data/pgdata` was the default,
but it is definitely not: `/var/lib/postgresql/data` is.

I removed this from `deploy-codeinsights-db.sh` for consistency with the Docker
Compose deployment, but this would have broken existing pure-docker deployments
because they were storing data in the `pgdata` subdirectory previously.

I have added this to Docker Compose deployments here, for consistency, although
it is not strictly required (Docker Compose volumes, unlike Kubernetes ones, do
not appear ot have a `lost+found` file in them and as such Postgres is happy to
use the root of the volume - whereas in Kubernetes deployments it will complain
the directory is not empty and fail to start.)

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
2021-02-26 16:18:47 -07:00
..
2020-10-23 10:51:10 -05:00

Sourcegraph for docker-compose

This folder contains a Sourcegraph docker-compose deployment.

Deploying

Simply clone the repository and docker-compose up -d to deploy Sourcegraph:

git clone https://github.com/sourcegraph/deploy-sourcegraph-docker
cd deploy-sourcegraph-docker/docker-compose/
git checkout v3.21.2
docker-compose up -d

Sourcegraph will then run in the background and across server restarts.

Notes:

  • The docker-compose.yaml file currently depends on configuration files which live in the repository, as such you must have the repository cloned onto your server.
  • Data for all services will be stored as docker volumes.
  • Use docker ps to inspect the Sourcegraph containers, and docker-compose down to teardown the deployment.

Upgrading

Always refer to https://docs.sourcegraph.com/admin/updates/docker_compose prior to upgrading, as it will document any manual steps you may need to take in order to upgrade smoothly.