mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-14 05:15:19 +00:00
docs
This commit is contained in:
parent
6ff0d3a949
commit
b800b762f6
1 changed files with 19 additions and 25 deletions
|
|
@ -4,14 +4,24 @@ title: "Deployment guide"
|
||||||
|
|
||||||
import SupportedPlatforms from '/snippets/platform-support.mdx'
|
import SupportedPlatforms from '/snippets/platform-support.mdx'
|
||||||
|
|
||||||
The following guide will walk you through the steps to deploy Sourcebot on your own infrastructure. 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.
|
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/choose) or by [emailing us](mailto:team@sourcebot.dev).</Note>
|
<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>
|
<Steps>
|
||||||
<Step title="Requirements">
|
<Step title="Requirements">
|
||||||
- Docker -> use [Docker Desktop](https://www.docker.com/products/docker-desktop/) on Mac or Windows.
|
- 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>
|
||||||
<Step title="Create a config.json">
|
<Step title="Create a config.json">
|
||||||
Create a `config.json` file that tells Sourcebot which repositories to sync and index:
|
Create a `config.json` file that tells Sourcebot which repositories to sync and index:
|
||||||
|
|
@ -38,33 +48,15 @@ The following guide will walk you through the steps to deploy Sourcebot on your
|
||||||
<Step title="Launch your instance">
|
<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>
|
<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:
|
||||||
|
|
||||||
In the same directory as `config.json`, run the following command to start your instance:
|
```bash wrap icon="terminal"
|
||||||
|
docker compose up -d
|
||||||
``` bash icon="terminal" Start the Sourcebot container
|
|
||||||
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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
<Accordion title="Details">
|
|
||||||
**This command**:
|
|
||||||
- pulls the latest version of the `sourcebot` docker image.
|
|
||||||
- mounts the working directory to `/data` in the container to allow Sourcebot to persist data across restarts, and to access the `config.json`. In your local directory, you should see a `.sourcebot` folder created that contains all persistent data.
|
|
||||||
- runs any pending database migrations.
|
|
||||||
- starts up all services, including the webserver exposed on port 3000.
|
|
||||||
- reads `config.json` and starts syncing.
|
|
||||||
</Accordion>
|
|
||||||
|
|
||||||
</Step>
|
</Step>
|
||||||
|
|
||||||
<Step title="Complete onboarding">
|
<Step title="Complete onboarding">
|
||||||
Navigate to `http://localhost:3000` and complete the onboarding flow.
|
Navigate to [http://localhost:3000](http://localhost:3000) and complete the onboarding flow.
|
||||||
</Step>
|
</Step>
|
||||||
|
|
||||||
<Step title="Done">
|
<Step title="Done">
|
||||||
|
|
@ -72,6 +64,8 @@ The following guide will walk you through the steps to deploy Sourcebot on your
|
||||||
</Step>
|
</Step>
|
||||||
</Steps>
|
</Steps>
|
||||||
|
|
||||||
|
Checkout the [configuration docs](/docs/configuration/environment-variables) to learn more about how to configure your deployment.
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue