Skip to content

Dev flow adjustments #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 4 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion packages/db/.env

This file was deleted.

2 changes: 0 additions & 2 deletions packages/db/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
node_modules

!.env