forked from BloopAI/bloop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitpod.yml
88 lines (72 loc) · 2.85 KB
/
.gitpod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
image:
file: .gitpod.Dockerfile
ports:
- name: Bloop Web Interface
port: 7878
protocol: http
additionalRepositories:
- url: https://github.com/bloopai/answer-api
checkoutLocation: answer-api
tasks:
- name: Backend
init: |
nix run nixpkgs#cachix use bloopai
# Setup Git LFS
git lfs pull model
git lfs install --skip-smudge
# Cache build artifacts
nix develop -c cargo build --locked --features=ee-cloud --bin bleep
nix develop -c npm i
# this is working around a gitpod bug
# https://github.com/gitpod-io/gitpod/issues/524
find target -exec stat --format='%.Y %n' {} + > /workspace/.ts
command: |
while read -r ts file; do touch -d "@${ts}" "${file}"; done < /workspace/.ts
bloop_url=$(gp url 7878 | sed 's;https://;;')
git reset --hard
nix develop -c cargo watch -w server -- \
cargo run --locked --features=ee-cloud --bin bleep -- \
\
--qdrant-url http://localhost:6334 \
--answer-api-url http://localhost:7879 \
--model-dir /workspace/bloop/model \
--frontend-dist /workspace/bloop/client/dist \
--instance-domain $bloop_url \
--bloop-instance-secret "$BLOOP_INSTANCE_SECRET" \
--bloop-instance-org "$BLOOP_INSTANCE_ORG" \
--cognito-config-url https://cloud-auth-staging.bloop.ai/bloop_config
openMode: split-left
- name: Frontend
command: |
nix develop -c npm i
nix develop -c npm run build-web -- -- --watch --minify false
openMode: split-right
- name: Qdrant
command: |
nix run nixpkgs#qdrant -- --config-path qdrant/config.yaml
openMode: tab-after
- name: answer-api
command: |
cd /workspace/answer-api
nix run /workspace/answer-api
openMode: tab-after
github:
prebuilds:
# enable for the default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: false
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: true
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: true