Skip to content

Commit 23644a9

Browse files
committed
add CONTRIBUTING.md file
1 parent 2c0cd1a commit 23644a9

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## Build from source
2+
>[!NOTE]
3+
> Building from source is only required if you'd like to contribute. The recommended way to use Sourcebot is to use the [pre-built docker image](https://github.com/sourcebot-dev/sourcebot/pkgs/container/sourcebot).
4+
5+
1. Install <a href="https://go.dev/doc/install"><img src="https://go.dev/favicon.ico" width="16" height="16"> go</a>, <a href="https://nodejs.org/"><img src="https://nodejs.org/favicon.ico" width="16" height="16"> NodeJS</a>, [redis](https://redis.io/), and [postgres](https://www.postgresql.org/). Note that a NodeJS version of at least `21.1.0` is required.
6+
7+
2. Install [ctags](https://github.com/universal-ctags/ctags) (required by zoekt)
8+
```sh
9+
// macOS:
10+
brew install universal-ctags
11+
12+
// Linux:
13+
snap install universal-ctags
14+
```
15+
16+
3. Clone the repository with submodules:
17+
```sh
18+
git clone --recurse-submodules https://github.com/sourcebot-dev/sourcebot.git
19+
```
20+
21+
4. Run `make` to build zoekt and install dependencies:
22+
```sh
23+
cd sourcebot
24+
make
25+
```
26+
27+
The zoekt binaries and web dependencies are placed into `bin` and `node_modules` respectively.
28+
29+
5. Create a copy of `.env.development` and name it `.env.development.local`. Update the required environment variables.
30+
31+
6. If you're using a declerative configuration file (the default behavior if you didn't enable auth), create a configuration file and update the `CONFIG_PATH` environment variable in your `.env.development.local` file.
32+
33+
7. Start Sourcebot with the command:
34+
```sh
35+
yarn dev
36+
```
37+
38+
A `.sourcebot` directory will be created and zoekt will begin to index the repositories found in the `config.json` file.
39+
40+
8. Start searching at `http://localhost:3000`.

0 commit comments

Comments
 (0)