You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
641 B
Markdown
36 lines
641 B
Markdown
# sourcegraph 安装
|
|
|
|
> 前提 : docker 和 docker-compose 都已准备完成。
|
|
|
|
## 配置文件
|
|
|
|
创建路径
|
|
|
|
```shell
|
|
mkdir -p /usr/local/sourcegraph/
|
|
```
|
|
|
|
## COMPOSE 文件
|
|
|
|
```shell
|
|
cat > /usr/local/sourcegraph/docker-compose.yml <<'EOF'
|
|
version: '3'
|
|
services:
|
|
sourcegraph:
|
|
restart: always
|
|
image: sourcegraph/server:2.13.5
|
|
container_name: sourcegraph
|
|
volumes:
|
|
- ./sourcegraph/config:/etc/sourcegraph
|
|
- ./sourcegraph/data:/var/opt/sourcegraph
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
ports:
|
|
- 9008:7080
|
|
EOF
|
|
```
|
|
|
|
## 启动
|
|
|
|
```shell
|
|
cd /usr/local/sourcegraph/ && docker-compose up -d
|
|
``` |