diff --git a/docker-compose/dev/README.md b/docker-compose/dev/README.md index cd87eda..fc50215 100644 --- a/docker-compose/dev/README.md +++ b/docker-compose/dev/README.md @@ -3,13 +3,18 @@ For use developing Sourcegraph's docker-compose deployment only. For deployments, refer to the official [Sourcegraph with Docker Compose](https://docs.sourcegraph.com/admin/install/docker-compose) documentation. +This folder includes a helper script, [run.sh](./run.sh), that will run the `docker-compose` command (with any provided arguments) while automatically specifying the appropriate set of overlays. + Example usage: ```sh -docker-compose \ - -f docker-compose/docker-compose.yaml \ - -f docker-compose/jaeger/docker-compose.yaml \ - -f docker-compose/dev/docker-compose.yaml up +./run.sh up -d ``` The above will deploy Sourcegraph on [http://localhost:8080](http://localhost:8080) with the indicated overlays. + +```sh +./run.sh down +``` + +The above will tear down the local Sourcegraph instance that was set up using the previous command. diff --git a/docker-compose/dev/run.sh b/docker-compose/dev/run.sh new file mode 100755 index 0000000..f5c3881 --- /dev/null +++ b/docker-compose/dev/run.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +cd "$(dirname "${BASH_SOURCE[0]}")/../.." +set -euxo pipefail + +docker-compose \ + -f docker-compose/docker-compose.yaml \ + -f docker-compose/jaeger/docker-compose.yaml \ + -f docker-compose/dev/docker-compose.yaml \ + "$@"