mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-11 20:05:25 +00:00
update docs
This commit is contained in:
parent
26caafba09
commit
39978ea90b
11 changed files with 92 additions and 114 deletions
37
README.md
37
README.md
|
|
@ -72,15 +72,22 @@ https://github.com/user-attachments/assets/31ec0669-707d-4e03-b511-1bc33d44197a
|
|||
|
||||
# Deploy Sourcebot
|
||||
|
||||
Sourcebot can be deployed in seconds using our official docker image. Visit our [docs](https://docs.sourcebot.dev/docs/deployment-guide) for more information.
|
||||
Sourcebot can be deployed in seconds using Docker Compose. Visit our [docs](https://docs.sourcebot.dev/docs/deployment/docker-compose) for more information.
|
||||
|
||||
1. Create a config
|
||||
1. Download the docker-compose.yml file
|
||||
```sh
|
||||
curl -o docker-compose.yml https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml
|
||||
```
|
||||
|
||||
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.
|
||||
```sh
|
||||
touch config.json
|
||||
echo '{
|
||||
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
|
||||
// Comments are supported.
|
||||
// This config creates a single connection to GitHub.com that
|
||||
// indexes the Sourcebot repository
|
||||
"connections": {
|
||||
// Comments are supported
|
||||
"starter-connection": {
|
||||
"type": "github",
|
||||
"repos": [
|
||||
|
|
@ -91,30 +98,12 @@ echo '{
|
|||
}' > config.json
|
||||
```
|
||||
|
||||
2. Run the docker container
|
||||
3. Update the secrets in the `docker-compose.yml` and then run Sourcebot using:
|
||||
```sh
|
||||
docker run \
|
||||
-p 3000:3000 \
|
||||
--pull=always \
|
||||
--rm \
|
||||
-v $(pwd):/data \
|
||||
-e CONFIG_PATH=/data/config.json \
|
||||
--name sourcebot \
|
||||
ghcr.io/sourcebot-dev/sourcebot:latest
|
||||
docker compose up
|
||||
```
|
||||
<details>
|
||||
<summary>What does this command do?</summary>
|
||||
|
||||
- Pull and run the Sourcebot docker image from [ghcr.io/sourcebot-dev/sourcebot:latest](https://github.com/sourcebot-dev/sourcebot/pkgs/container/sourcebot).
|
||||
- Mount the current directory (`-v $(pwd):/data`) to allow Sourcebot to persist the `.sourcebot` cache.
|
||||
- Clones sourcebot at `HEAD` into `.sourcebot/github/sourcebot-dev/sourcebot`.
|
||||
- Indexes sourcebot into a .zoekt index file in `.sourcebot/index/`.
|
||||
- Map port 3000 between your machine and the docker image.
|
||||
- Starts the web server on port 3000.
|
||||
</details>
|
||||
</br>
|
||||
|
||||
3. Visit `http://localhost:3000` to start using Sourcebot
|
||||
4. Visit `http://localhost:3000` to start using Sourcebot
|
||||
</br>
|
||||
|
||||
To configure Sourcebot (index your own repos, connect your LLMs, etc), check out our [docs](https://docs.sourcebot.dev/docs/configuration/config-file).
|
||||
|
|
|
|||
|
|
@ -21,7 +21,13 @@
|
|||
"group": "Getting Started",
|
||||
"pages": [
|
||||
"docs/overview",
|
||||
"docs/deployment-guide"
|
||||
{
|
||||
"group": "Deployment",
|
||||
"pages": [
|
||||
"docs/deployment/docker-compose",
|
||||
"docs/deployment/k8s"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ title: Environment variables
|
|||
sidebarTitle: Environment variables
|
||||
---
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
### Core Environment Variables
|
||||
The following environment variables allow you to configure your Sourcebot deployment.
|
||||
|
|
|
|||
|
|
@ -1,82 +0,0 @@
|
|||
---
|
||||
title: "Deployment guide"
|
||||
---
|
||||
|
||||
import SupportedPlatforms from '/snippets/platform-support.mdx'
|
||||
|
||||
Sourcebot is distributed as a [single docker container](/docs/overview#architecture) that can be deployed to a k8s cluster, a VM, or any platform that supports docker. The following guide will walk you through the steps to deploy Sourcebot locally using [Docker compose](https://docs.docker.com/compose).
|
||||
|
||||
|
||||
<Note>Hit an issue? Please let us know on [GitHub](https://github.com/sourcebot-dev/sourcebot/issues/new) or by [emailing us](mailto:team@sourcebot.dev).</Note>
|
||||
|
||||
## Walkthrough
|
||||
---
|
||||
|
||||
<Steps>
|
||||
<Step title="Requirements">
|
||||
- docker & docker compose -> use [Docker Desktop](https://www.docker.com/products/docker-desktop/) on Mac or Windows.
|
||||
</Step>
|
||||
<Step title="Obtain the Docker Compose file">
|
||||
Download the [docker-compose.yml](https://github.com/sourcebot-dev/sourcebot/blob/main/docker-compose.yml) file from the Sourcebot repository.
|
||||
|
||||
```bash wrap icon="terminal"
|
||||
curl -o docker-compose.yml https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml
|
||||
```
|
||||
</Step>
|
||||
<Step title="Create a config.json">
|
||||
Create a `config.json` file that tells Sourcebot which repositories to sync and index:
|
||||
|
||||
```bash wrap icon="terminal" Create example config
|
||||
touch config.json
|
||||
echo '{
|
||||
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
|
||||
"connections": {
|
||||
// comments are supported
|
||||
"starter-connection": {
|
||||
"type": "github",
|
||||
"repos": [
|
||||
"sourcebot-dev/sourcebot"
|
||||
]
|
||||
}
|
||||
}
|
||||
}' > config.json
|
||||
```
|
||||
|
||||
This config creates a single GitHub connection named `starter-connection` that specifies [Sourcebot](https://github.com/sourcebot-dev/sourcebot) as a repo to sync. [Learn more about the config file](/docs/configuration/config-file).
|
||||
</Step>
|
||||
|
||||
<Step title="Launch your instance">
|
||||
<Warning>If you're deploying Sourcebot behind a domain, you must set the [AUTH_URL](/docs/configuration/environment-variables) environment variable.</Warning>
|
||||
|
||||
Launch your Sourcebot instance:
|
||||
|
||||
```bash wrap icon="terminal"
|
||||
docker compose up -d
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Complete onboarding">
|
||||
Navigate to [http://localhost:3000](http://localhost:3000) and complete the onboarding flow.
|
||||
</Step>
|
||||
|
||||
<Step title="Done">
|
||||
You're all set! If you'd like to setup [Ask Sourcebot](/docs/features/ask/overview), configure a language model [provider](/docs/configuration/language-model-providers).
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
Checkout the [configuration docs](/docs/configuration/environment-variables) to learn more about how to configure your deployment.
|
||||
|
||||
## Next steps
|
||||
---
|
||||
|
||||
<CardGroup cols={3}>
|
||||
<Card title="Index your code" icon="code" href="/docs/connections/overview">
|
||||
Learn how to index your code using Sourcebot
|
||||
</Card>
|
||||
<Card title="Language models" icon="brain" href="/docs/configuration/language-model-providers">
|
||||
Learn how to configure language model providers to start using [Ask Sourcebot](/docs/features/ask/overview)
|
||||
</Card>
|
||||
<Card title="Authentication" icon="lock" href="/docs/configuration/auth/overview">
|
||||
Learn more about how to setup SSO, email codes, and other authentication providers.
|
||||
</Card>
|
||||
</CardGroup>
|
||||
61
docs/docs/deployment/docker-compose.mdx
Normal file
61
docs/docs/deployment/docker-compose.mdx
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
---
|
||||
title: "Docker Compose"
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
If you are looking to deploy onto Kubernetes, see the [Kubernetes (Helm)](/docs/deployment/k8s) guide.
|
||||
|
||||
## Get started
|
||||
|
||||
<Steps>
|
||||
<Step title="Requirements">
|
||||
- docker & docker compose. Use [Docker Desktop](https://www.docker.com/products/docker-desktop/) on Mac or Windows.
|
||||
</Step>
|
||||
<Step title="Obtain the Docker Compose file">
|
||||
Download the [docker-compose.yml](https://github.com/sourcebot-dev/sourcebot/blob/main/docker-compose.yml) file from the Sourcebot repository.
|
||||
|
||||
```bash wrap icon="terminal"
|
||||
curl -o docker-compose.yml https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/docker-compose.yml
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Create a config.json">
|
||||
|
||||
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.
|
||||
|
||||
```bash wrap icon="terminal" Create example config
|
||||
touch config.json
|
||||
echo '{
|
||||
"$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json",
|
||||
// Comments are supported.
|
||||
// This config creates a single connection to GitHub.com that
|
||||
// indexes the Sourcebot repository
|
||||
"connections": {
|
||||
"starter-connection": {
|
||||
"type": "github",
|
||||
"repos": [
|
||||
"sourcebot-dev/sourcebot"
|
||||
]
|
||||
}
|
||||
}
|
||||
}' > config.json
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Launch your instance">
|
||||
Update the secrets in the `docker-compose.yml` and then run Sourcebot using:
|
||||
|
||||
```bash wrap icon="terminal"
|
||||
docker compose up
|
||||
```
|
||||
</Step>
|
||||
|
||||
<Step title="Done">
|
||||
You're all set! Navigate to [http://localhost:3000](http://localhost:3000) to access your Sourcebot instance.
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Next steps
|
||||
|
||||
|
||||
4
docs/docs/deployment/k8s.mdx
Normal file
4
docs/docs/deployment/k8s.mdx
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: "Kubernetes (Helm)"
|
||||
url: https://github.com/sourcebot-dev/sourcebot-helm-chart
|
||||
---
|
||||
|
|
@ -10,7 +10,7 @@ codebase that the agent may fetch to perform the review.
|
|||
|
||||
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.
|
||||
|
||||
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)
|
||||
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)
|
||||
and then follow the configuration instructions below.
|
||||
|
||||

|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ follow code nav references, and provide an answer that’s rich with inline cita
|
|||
<Card title="Index repos" icon="book" href="/docs/connections/overview" horizontal="true">
|
||||
Learn how to index your repos so you can ask questions about them
|
||||
</Card>
|
||||
<Card title="Deployment guide" icon="server" href="/docs/deployment-guide" horizontal="true">
|
||||
<Card title="Deployment guide" icon="server" href="/docs/deployment/docker-compose" horizontal="true">
|
||||
Learn how to self-host Sourcebot in a few simple steps.
|
||||
</Card>
|
||||
<Card title="Public demo" icon="globe" href="https://demo.sourcebot.dev/" horizontal="true">
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP)
|
|||
|
||||
<Steps>
|
||||
<Step title="Launch Sourcebot">
|
||||
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.
|
||||
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.
|
||||
|
||||
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).
|
||||
</Step>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Search across all your repos/branches across any code host platform. Blazingly f
|
|||
<Card title="Branches" icon="split" href="/docs/features/search/multi-branch-indexing" horizontal="true">
|
||||
Learn how to index and search through your branches
|
||||
</Card>
|
||||
<Card title="Deployment guide" icon="server" href="/docs/deployment-guide" horizontal="true">
|
||||
<Card title="Deployment guides" icon="server" href="/docs/deployment/docker-compose" horizontal="true">
|
||||
Learn how to self-host Sourcebot in a few simple steps.
|
||||
</Card>
|
||||
<Card title="Public demo" icon="globe" href="https://demo.sourcebot.dev/" horizontal="true">
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ title: "Overview"
|
|||
- [MCP](/docs/features/mcp-server): Enrich agent context windows with code across your organization
|
||||
|
||||
<CardGroup>
|
||||
<Card title="Deployment guide" icon="server" href="/docs/deployment-guide" horizontal="true">
|
||||
<Card title="Deployment guides" icon="server" href="/docs/deployment/docker-compose" horizontal="true">
|
||||
Learn how to self-host Sourcebot in a few simple steps.
|
||||
</Card>
|
||||
<Card title="Public demo" icon="globe" href="https://demo.sourcebot.dev/" horizontal="true">
|
||||
|
|
@ -162,7 +162,7 @@ Sourcebot is designed to be easily self-hosted, allowing you to deploy it onto y
|
|||
---
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card horizontal title="Deployment guide ->" href="/docs/deployment-guide" />
|
||||
<Card horizontal title="Deployment guides ->" href="/docs/deployment/docker-compose" />
|
||||
<Card horizontal title="Connecting your code ->" href="/docs/connections/overview" />
|
||||
<Card horizontal title="Search syntax reference ->" href="/docs/features/search/syntax-reference" />
|
||||
<Card horizontal title="Code navigation overview ->" href="/docs/features/code-navigation" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue