Last active
June 25, 2020 19:21
-
-
Save abitrolly/247568f07790f69abb2300e1fdab82cb to your computer and use it in GitHub Desktop.
run sourcegraph on local repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# port 3434 - src-expose | |
# port 7080 - sourcegraph main server | |
# port 3370 - sourcegraph monitoring | |
podman pod create --name srcview -p 127.0.0.1:3434:3434 -p 127.0.0.1:7080:7080 -p 127.0.0.1:3370:3370 | |
# sync code to default dir with bare repos, and serve bare repos | |
podman run --pod srcview --name reposync --rm -v "${PWD}:/var/opt/localrepo":Z,ro sourcegraph/src-expose:latest /var/opt/localrepo | |
mkdir -p /tmp/.sourcegraph/config | |
mkdir -p /tmp/.sourcegraph/data | |
podman run --pod srcview --name sourcegraph --rm -v /tmp/.sourcegraph/config:/etc/sourcegraph:Z -v /tmp/.sourcegraph/data:/var/opt/sourcegraph:Z sourcegraph/server:3.17.1 | |
# then add the config | |
{ | |
"url": "http://127.0.0.1:3434", | |
"repos": [ | |
"src-expose" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment