forked from freeCodeCamp/freeCodeCamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitpod.yml
81 lines (75 loc) · 2.3 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
image: gitpod/workspace-mongodb
ports:
- port: 27017 # mongodb
onOpen: ignore
- port: 8000 # client
onOpen: open-preview
- port: 9228 # node debug
onOpen: ignore
- port: 3000 # api
onOpen: ignore
- port: 9229 # node debug
onOpen: ignore
tasks:
- before: |
echo '
export COOKIE_DOMAIN=gitpod.io
export HOME_LOCATION=$(gp url 8000)
export API_LOCATION=$(gp url 3000)
' >> ~/.bashrc;
exit;
- name: db
# starting mongo in background, so it doesn't block prebuilds
before: >
mkdir -p /workspace/data &&
(mongod --dbpath /workspace/data &)
- name: server
before: export COOKIE_DOMAIN=gitpod.io && export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000)
# init is not executed for prebuilt workspaces and restarts,
# so we should put all the heavy initialization here
init: >
cp sample.env .env &&
npm ci &&
gp sync-done npm-ci &&
gp await-port 27017 &&
npm run seed &&
mongo --eval "db.fsyncLock(); db.fsyncUnlock()"
command: >
npm run ensure-env &&
gp await-port 27017 &&
npm run develop:server
- name: client
before: export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000)
init: >
cd ./client &&
gp sync-await npm-ci &&
npm run prebuild &&
npm run build:workers &&
cd ..
command: >
gp await-port 3000 &&
cd ./client &&
npm run develop -- -H '0.0.0.0'
openMode: split-right
github:
prebuilds:
# enable for the master/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: true
# 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: false
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: false
vscode:
extensions:
- dbaeumer.vscode-eslint@2.1.5:9Wg0Glx/TwD8ElFBg+FKcQ==
- esbenp.prettier-vscode@4.7.0:kgoYSh1LwTixKtJtQWtodQ==