mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-14 05:15:19 +00:00
init (#176)
This commit is contained in:
parent
ed0d28a4f0
commit
78c9111fa0
4 changed files with 5 additions and 15 deletions
|
|
@ -348,7 +348,7 @@ docker run <b>-v /path/to/my-repo:/repos/my-repo</b> /* additional args */ ghcr.
|
|||
>[!NOTE]
|
||||
> 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).
|
||||
|
||||
1. Install <a href="https://go.dev/doc/install"><img src="https://go.dev/favicon.ico" width="16" height="16"> go</a> and <a href="https://nodejs.org/"><img src="https://nodejs.org/favicon.ico" width="16" height="16"> NodeJS</a>. Note that a NodeJS version of at least `21.1.0` is required.
|
||||
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.
|
||||
|
||||
2. Install [ctags](https://github.com/universal-ctags/ctags) (required by zoekt)
|
||||
```sh
|
||||
|
|
|
|||
15
package.json
15
package.json
|
|
@ -6,19 +6,12 @@
|
|||
"scripts": {
|
||||
"build": "yarn workspaces run build",
|
||||
"test": "yarn workspaces run test",
|
||||
"dev": "(cross-env SOURCEBOT_TENANT_MODE=single npm-run-all --print-label dev:deps:start dev:deps:wait dev:start); yarn dev:deps:stop",
|
||||
"dev:mt": "(cross-env SOURCEBOT_TENANT_MODE=multi npm-run-all --print-label dev:deps:start dev:deps:wait dev:start); yarn dev:deps:stop",
|
||||
"dev:start": "yarn workspace @sourcebot/db prisma:migrate:dev && cross-env npm-run-all --print-label --parallel dev:zoekt dev:backend dev:web dev:redis",
|
||||
"dev": "cross-env SOURCEBOT_TENANT_MODE=single npm-run-all --print-label dev:start",
|
||||
"dev:mt": "cross-env SOURCEBOT_TENANT_MODE=multi npm-run-all --print-label dev:start",
|
||||
"dev:start": "yarn workspace @sourcebot/db prisma:migrate:dev && cross-env npm-run-all --print-label --parallel dev:zoekt dev:backend dev:web",
|
||||
"dev:zoekt": "export PATH=\"$PWD/bin:$PATH\" && export SRC_TENANT_ENFORCEMENT_MODE=none && zoekt-webserver -index .sourcebot/index -rpc",
|
||||
"dev:backend": "yarn workspace @sourcebot/backend dev:watch",
|
||||
"dev:web": "yarn workspace @sourcebot/web dev",
|
||||
"dev:deps:start": "npm-run-all --print-label --parallel dev:postgres dev:redis",
|
||||
"dev:deps:wait": "npm-run-all --print-label --parallel dev:postgres:wait dev:redis:wait",
|
||||
"dev:deps:stop": "docker stop redis postgres",
|
||||
"dev:redis": "docker ps --filter 'name=redis' --filter 'status=running' --quiet | grep -q . || docker run -d --rm --name redis -p 6379:6379 redis:7.4.2",
|
||||
"dev:redis:wait": "sh -c 'while ! nc -z localhost 6379; do echo \"Waiting for Redis...\"; sleep 1; done'",
|
||||
"dev:postgres": "docker ps --filter 'name=postgres' --filter 'status=running' --quiet | grep -q . || docker run -d --rm --name postgres -p 5432:5432 -v $(pwd)/.sourcebot/db:/var/lib/postgresql/data -e POSTGRES_USER=postgres -e POSTGRES_HOST_AUTH_METHOD=trust -e POSTGRES_DB=sourcebot postgres:17.2",
|
||||
"dev:postgres:wait": "sh -c 'while ! nc -z localhost 5432; do echo \"Waiting for PostgreSQL...\"; sleep 1; done'"
|
||||
"dev:web": "yarn workspace @sourcebot/web dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-env": "^7.0.3",
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
DATABASE_URL=postgresql://postgres@localhost:5432/sourcebot
|
||||
2
packages/db/.gitignore
vendored
2
packages/db/.gitignore
vendored
|
|
@ -1,3 +1 @@
|
|||
node_modules
|
||||
|
||||
!.env
|
||||
Loading…
Reference in a new issue