- Install docker toolbox or docker CE.
- Clone Sourcegraph project at the root of this project.
git clone https://github.com/sourcegraph/sourcegraph.git code
- 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
- Create a copy of
/code/dev/launch.sh
asinstall.sh
- 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
- Go to the root of the project using the terminal and run:
docker-compose up
- Let's wait until Sourcegraph initializes.
- Open
http://localhost:3080
or if your are using docker machine would behttp://<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.