|
| 1 | +# This configuration file was automatically generated by Gitpod. |
| 2 | +# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) |
| 3 | +# and commit this file to your remote git repository to share the goodness with others. |
| 4 | + |
| 5 | +# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart |
| 6 | + |
| 7 | +image: |
| 8 | + file: .gitpod.Dockerfile |
| 9 | + |
| 10 | +ports: |
| 11 | + - name: Bloop Web Interface |
| 12 | + port: 7878 |
| 13 | + protocol: http |
| 14 | + |
| 15 | +additionalRepositories: |
| 16 | + - url: https://github.com/bloopai/answer-api |
| 17 | + checkoutLocation: answer-api |
| 18 | + |
| 19 | +tasks: |
| 20 | + - name: Backend |
| 21 | + init: | |
| 22 | + nix run nixpkgs#cachix use bloopai |
| 23 | +
|
| 24 | + # Setup Git LFS |
| 25 | + git lfs pull model |
| 26 | + git lfs install --skip-smudge |
| 27 | +
|
| 28 | + # Cache build artifacts |
| 29 | + nix develop -c cargo build --locked -p bleep |
| 30 | + nix develop -c npm i |
| 31 | +
|
| 32 | + # this is working around a gitpod bug |
| 33 | + # https://github.com/gitpod-io/gitpod/issues/524 |
| 34 | + cp -a ~/.cargo . |
| 35 | + tar czpf /workspace/target.tar.gz target .cargo |
| 36 | + rm -rf .cargo target |
| 37 | +
|
| 38 | + command: | |
| 39 | + tar -C /workspace -xzpf /workspace/target.tar.gz |
| 40 | + rm -rf ~/.cargo target |
| 41 | + mv /workspace/.cargo ~ |
| 42 | + mv /workspace/target . |
| 43 | +
|
| 44 | + echo "$BLOOP_GITHUB_SECRET_KEY" |base64 -d > /workspace/github-app-private-key.pem |
| 45 | + bloop_url=$(gp url 7878 | sed 's;https://;;') |
| 46 | +
|
| 47 | + git reset --hard |
| 48 | +
|
| 49 | + nix develop -c cargo watch -w server -- \ |
| 50 | + cargo run --locked --features=ee -p bleep -- \ |
| 51 | + \ |
| 52 | + --qdrant-url http://localhost:6334 \ |
| 53 | + --answer-api-url http://localhost:7879 \ |
| 54 | + --model-dir /workspace/bloop/model \ |
| 55 | + --frontend-dist /workspace/bloop/client/dist \ |
| 56 | + --instance-domain $bloop_url \ |
| 57 | + --github-app-id $BLOOP_GITHUB_APP_ID \ |
| 58 | + --github-app-install-id $BLOOP_GITHUB_APP_INSTALL_ID \ |
| 59 | + --github-client-id $BLOOP_GITHUB_CLIENT_ID \ |
| 60 | + --github-client-secret $BLOOP_GITHUB_CLIENT_SECRET \ |
| 61 | + --github-app-private-key /workspace/github-app-private-key.pem |
| 62 | +
|
| 63 | + openMode: split-left |
| 64 | + |
| 65 | + - name: Frontend |
| 66 | + command: | |
| 67 | + nix develop -c npm i |
| 68 | + nix develop -c npm run build-web -- -- --watch |
| 69 | + openMode: split-right |
| 70 | + |
| 71 | + - name: Qdrant |
| 72 | + command: | |
| 73 | + nix run nixpkgs#qdrant -- --config-path qdrant/config.yaml |
| 74 | + openMode: tab-after |
| 75 | + |
| 76 | + - name: answer-api |
| 77 | + command: | |
| 78 | + cd /workspace/answer-api |
| 79 | + git checkout nix-cachix |
| 80 | + nix run /workspace/answer-api?ref=origin/nix-cachix# |
| 81 | + openMode: tab-after |
0 commit comments