Skip to content

JoseFdri/sourcegraph-docker-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installation

  1. Install docker toolbox or docker CE.
  2. Clone Sourcegraph project at the root of this project.
git clone https://github.com/sourcegraph/sourcegraph.git code
  1. Update the following env variable in code/dev/launch.sh
export REDIS_ENDPOINT=redis:6379

4.Remove the following lines in code/dev/launch.sh

# Verify postgresql config.
hash psql 2>/dev/null || {
    # "brew install [email protected]" does not put psql on the $PATH by default;
    # try to fix this automatically if we can.
    hash brew 2>/dev/null && {
        if [[ -x "$(brew --prefix)/opt/[email protected]/bin/psql" ]]; then
            export PATH="$(brew --prefix)/opt/[email protected]/bin:$PATH"
        fi
    }
}
if ! psql -wc '\x' >/dev/null; then
    echo "FAIL: postgreSQL config invalid or missing OR postgreSQL is still starting up."
    echo "You probably need, at least, PGUSER and PGPASSWORD set in the environment."
    exit 1
fi
  1. Create a copy of /code/dev/launch.sh as install.sh
  2. Remove the following lines in install.sh
printf >&2 "\nStarting all binaries...\n\n"
export GOREMAN="goreman --set-ports=false --exit-on-error -f ${PROCFILE:-dev/Procfile}"
exec $GOREMAN start
  1. Go to the root of the project using the terminal and run:
docker-compose up
  1. Let's wait until Sourcegraph initializes.
  2. Open http://localhost:3080 or if your are using docker machine would be http://<docker-machine ip>:3080

Note: If you are running docker using docker-machine you should replace localhost with the docker machine IP in the Sourcegraph project.

Any contribution will be appreciated.

About

Setup a dev environment for Sourcegraph using Docker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published