Skip to content

Commit 39978ea

Browse files
update docs
1 parent 26caafb commit 39978ea

File tree

11 files changed

+92
-114
lines changed

11 files changed

+92
-114
lines changed

README.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,22 @@ https://github.com/user-attachments/assets/31ec0669-707d-4e03-b511-1bc33d44197a
7272

7373
# Deploy Sourcebot
7474

75-
Sourcebot can be deployed in seconds using our official docker image. Visit our [docs](https://docs.sourcebot.dev/docs/deployment-guide) for more information.
75+
Sourcebot can be deployed in seconds using Docker Compose. Visit our [docs](https://docs.sourcebot.dev/docs/deployment/docker-compose) for more information.
7676

77-
1. Create a config
77+
1. Download the docker-compose.yml file
78+
```sh
79+
curl -o docker-compose.yml https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml
80+
```
81+
82+
2. In the same directory as the `docker-compose.yml` file, create a [configuration file](https://docs.sourcebot.dev/docs/configuration/config-file). The configuration file is a JSON file that configures Sourcebot's behaviour, including what repositories to index, language model providers, auth providers, and more.
7883
```sh
7984
touch config.json
8085
echo '{
8186
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
87+
// Comments are supported.
88+
// This config creates a single connection to GitHub.com that
89+
// indexes the Sourcebot repository
8290
"connections": {
83-
// Comments are supported
8491
"starter-connection": {
8592
"type": "github",
8693
"repos": [
@@ -91,30 +98,12 @@ echo '{
9198
}' > config.json
9299
```
93100

94-
2. Run the docker container
101+
3. Update the secrets in the `docker-compose.yml` and then run Sourcebot using:
95102
```sh
96-
docker run \
97-
-p 3000:3000 \
98-
--pull=always \
99-
--rm \
100-
-v $(pwd):/data \
101-
-e CONFIG_PATH=/data/config.json \
102-
--name sourcebot \
103-
ghcr.io/sourcebot-dev/sourcebot:latest
103+
docker compose up
104104
```
105-
<details>
106-
<summary>What does this command do?</summary>
107-
108-
- Pull and run the Sourcebot docker image from [ghcr.io/sourcebot-dev/sourcebot:latest](https://github.com/sourcebot-dev/sourcebot/pkgs/container/sourcebot).
109-
- Mount the current directory (`-v $(pwd):/data`) to allow Sourcebot to persist the `.sourcebot` cache.
110-
- Clones sourcebot at `HEAD` into `.sourcebot/github/sourcebot-dev/sourcebot`.
111-
- Indexes sourcebot into a .zoekt index file in `.sourcebot/index/`.
112-
- Map port 3000 between your machine and the docker image.
113-
- Starts the web server on port 3000.
114-
</details>
115-
</br>
116105

117-
3. Visit `http://localhost:3000` to start using Sourcebot
106+
4. Visit `http://localhost:3000` to start using Sourcebot
118107
</br>
119108

120109
To configure Sourcebot (index your own repos, connect your LLMs, etc), check out our [docs](https://docs.sourcebot.dev/docs/configuration/config-file).

docs/docs.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
"group": "Getting Started",
2222
"pages": [
2323
"docs/overview",
24-
"docs/deployment-guide"
24+
{
25+
"group": "Deployment",
26+
"pages": [
27+
"docs/deployment/docker-compose",
28+
"docs/deployment/k8s"
29+
]
30+
}
2531
]
2632
},
2733
{

docs/docs/configuration/environment-variables.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Environment variables
33
sidebarTitle: Environment variables
44
---
55

6-
<Note>This page provides a detailed reference of all environment variables supported by Sourcebot. If you're just looking to get up and running, we recommend starting with the [deployment guide](/docs/deployment-guide) instead.</Note>
6+
<Note>This page provides a detailed reference of all environment variables supported by Sourcebot. If you're just looking to get up and running, we recommend starting with the [deployment guides](/docs/deployment/docker-compose) instead.</Note>
77

88
### Core Environment Variables
99
The following environment variables allow you to configure your Sourcebot deployment.

docs/docs/deployment-guide.mdx

Lines changed: 0 additions & 82 deletions
This file was deleted.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: "Docker Compose"
3+
---
4+
5+
This guide will walk you through deploying Sourcebot locally or on a VM using Docker Compose. We will use the [docker-compose.yml](https://github.com/sourcebot-dev/sourcebot/blob/main/docker-compose.yml) file from the Sourcebot repository. This is the simplest way to get started with Sourcebot.
6+
7+
If you are looking to deploy onto Kubernetes, see the [Kubernetes (Helm)](/docs/deployment/k8s) guide.
8+
9+
## Get started
10+
11+
<Steps>
12+
<Step title="Requirements">
13+
- docker & docker compose. Use [Docker Desktop](https://www.docker.com/products/docker-desktop/) on Mac or Windows.
14+
</Step>
15+
<Step title="Obtain the Docker Compose file">
16+
Download the [docker-compose.yml](https://github.com/sourcebot-dev/sourcebot/blob/main/docker-compose.yml) file from the Sourcebot repository.
17+
18+
```bash wrap icon="terminal"
19+
curl -o docker-compose.yml https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml
20+
```
21+
</Step>
22+
23+
<Step title="Create a config.json">
24+
25+
In the same directory as the `docker-compose.yml` file, create a [configuration file](/docs/configuration/config-file). The configuration file is a JSON file that configures Sourcebot's behaviour, including what repositories to index, language model providers, auth providers, and more.
26+
27+
```bash wrap icon="terminal" Create example config
28+
touch config.json
29+
echo '{
30+
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
31+
// Comments are supported.
32+
// This config creates a single connection to GitHub.com that
33+
// indexes the Sourcebot repository
34+
"connections": {
35+
"starter-connection": {
36+
"type": "github",
37+
"repos": [
38+
"sourcebot-dev/sourcebot"
39+
]
40+
}
41+
}
42+
}' > config.json
43+
```
44+
</Step>
45+
46+
<Step title="Launch your instance">
47+
Update the secrets in the `docker-compose.yml` and then run Sourcebot using:
48+
49+
```bash wrap icon="terminal"
50+
docker compose up
51+
```
52+
</Step>
53+
54+
<Step title="Done">
55+
You're all set! Navigate to [http://localhost:3000](http://localhost:3000) to access your Sourcebot instance.
56+
</Step>
57+
</Steps>
58+
59+
## Next steps
60+
61+

docs/docs/deployment/k8s.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "Kubernetes (Helm)"
3+
url: https://github.com/sourcebot-dev/sourcebot-helm-chart
4+
---

docs/docs/features/agents/review-agent.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ codebase that the agent may fetch to perform the review.
1010

1111
This agent provides codebase-aware reviews for your PRs. For each diff, this agent fetches relevant context from Sourcebot and feeds it into an LLM for a detailed review of your changes.
1212

13-
The AI Code Review Agent is [fair source](https://github.com/sourcebot-dev/sourcebot/tree/main/packages/web/src/features/agents/review-agent) and packaged in [Sourcebot](https://github.com/sourcebot-dev/sourcebot). To get started using this agent, [deploy Sourcebot](/docs/deployment-guide)
13+
The AI Code Review Agent is [fair source](https://github.com/sourcebot-dev/sourcebot/tree/main/packages/web/src/features/agents/review-agent) and packaged in [Sourcebot](https://github.com/sourcebot-dev/sourcebot). To get started using this agent, [deploy Sourcebot](/docs/deployment/docker-compose)
1414
and then follow the configuration instructions below.
1515

1616
![AI Code Review Agent Example](/images/review_agent_example.png)

docs/docs/features/ask/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ follow code nav references, and provide an answer that’s rich with inline cita
1414
<Card title="Index repos" icon="book" href="/docs/connections/overview" horizontal="true">
1515
Learn how to index your repos so you can ask questions about them
1616
</Card>
17-
<Card title="Deployment guide" icon="server" href="/docs/deployment-guide" horizontal="true">
17+
<Card title="Deployment guide" icon="server" href="/docs/deployment/docker-compose" horizontal="true">
1818
Learn how to self-host Sourcebot in a few simple steps.
1919
</Card>
2020
<Card title="Public demo" icon="globe" href="https://demo.sourcebot.dev/" horizontal="true">

docs/docs/features/mcp-server.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP)
99

1010
<Steps>
1111
<Step title="Launch Sourcebot">
12-
Follow the [deployment guide](/docs/deployment-guide) to launch Sourcebot and get your code indexed. The host url of your instance (e.g., `http://localhost:3000`) is passed to the MCP server via the `SOURCEBOT_HOST` url.
12+
Follow the [deployment guides](/docs/deployment/docker-compose) to launch Sourcebot and get your code indexed. The host url of your instance (e.g., `http://localhost:3000`) is passed to the MCP server via the `SOURCEBOT_HOST` url.
1313

1414
If a host is not provided, then the server will fallback to using the demo instance hosted at https://demo.sourcebot.dev. You can see the list of repositories indexed [here](https://demo.sourcebot.dev/~/repos). Add additional repositories by [opening a PR](https://github.com/sourcebot-dev/sourcebot/blob/main/demo-site-config.json).
1515
</Step>

docs/docs/features/search/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Search across all your repos/branches across any code host platform. Blazingly f
2222
<Card title="Branches" icon="split" href="/docs/features/search/multi-branch-indexing" horizontal="true">
2323
Learn how to index and search through your branches
2424
</Card>
25-
<Card title="Deployment guide" icon="server" href="/docs/deployment-guide" horizontal="true">
25+
<Card title="Deployment guides" icon="server" href="/docs/deployment/docker-compose" horizontal="true">
2626
Learn how to self-host Sourcebot in a few simple steps.
2727
</Card>
2828
<Card title="Public demo" icon="globe" href="https://demo.sourcebot.dev/" horizontal="true">

0 commit comments

Comments
 (0)