sourcegraph安装
------------恢复内容开始------------
1.下载docker compose v2 (别下错了,网上的其他的安装说明都是错的,官方提示了要v2版本)
https://docs.sourcegraph.com/admin/deploy/docker-compose
wget -P /usr/local/bin/ https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-linux-x86_64 mv docker-compose-linux-x86_64 docker-compose chmod 777 docker-compose
2.下载部署代码
先fork https://github.com/sourcegraph/deploy-sourcegraph-docker/
如果不需要更新,然后其实可以直接clone
git clone https://github.com/wgcn2023/deploy-sourcegraph-docker.git
3. 修改
deploy-sourcegraph-docker/docker-compose/docker-compose.yaml
pgsql改成如下配置
pgsql: condition: service_started codeintel-db: condition: service_healthy migrator: condition: service_completed_successfully
4. 执行docker-compose up -d ,大概率不会出错
然后就可以愉快的使用了
添加仓库:
检索语法:
https://docs.sourcegraph.com/@v3.39.1/code_search/reference/queries