|
1 | 1 | image: gitpod/workspace-mongodb
|
2 | 2 | ports:
|
3 |
| -- port: 27017 # mongodb |
4 |
| - onOpen: ignore |
5 |
| -- port: 8000 # client |
6 |
| - onOpen: open-preview |
7 |
| -- port: 9228 # node debug |
8 |
| - onOpen: ignore |
9 |
| -- port: 3000 # api |
10 |
| - onOpen: ignore |
11 |
| -- port: 9229 # node debug |
12 |
| - onOpen: ignore |
| 3 | + - port: 27017 # mongodb |
| 4 | + onOpen: ignore |
| 5 | + - port: 8000 # client |
| 6 | + onOpen: open-preview |
| 7 | + - port: 9228 # node debug |
| 8 | + onOpen: ignore |
| 9 | + - port: 3000 # api |
| 10 | + onOpen: ignore |
| 11 | + - port: 9229 # node debug |
| 12 | + onOpen: ignore |
13 | 13 |
|
14 | 14 | tasks:
|
15 |
| -- before: | |
16 |
| - echo ' |
17 |
| - export COOKIE_DOMAIN=gitpod.io |
18 |
| - export HOME_LOCATION=$(gp url 8000) |
19 |
| - export API_LOCATION=$(gp url 3000) |
20 |
| - ' >> ~/.bashrc; |
21 |
| - exit; |
| 15 | + - before: | |
| 16 | + echo ' |
| 17 | + export COOKIE_DOMAIN=gitpod.io |
| 18 | + export HOME_LOCATION=$(gp url 8000) |
| 19 | + export API_LOCATION=$(gp url 3000) |
| 20 | + export CYPRESS_BASE_URL=$(gp url 8000) |
| 21 | + ' >> ~/.bashrc; |
| 22 | + exit; |
22 | 23 |
|
23 |
| -- name: db |
24 |
| - # starting mongo in background, so it doesn't block prebuilds |
25 |
| - before: > |
26 |
| - mkdir -p /workspace/data && |
27 |
| - (mongod --dbpath /workspace/data &) |
| 24 | + - name: db |
| 25 | + # starting mongo in background, so it doesn't block prebuilds |
| 26 | + before: > |
| 27 | + mkdir -p /workspace/data && |
| 28 | + (mongod --dbpath /workspace/data &) |
28 | 29 |
|
29 |
| -- name: server |
30 |
| - before: export COOKIE_DOMAIN=gitpod.io && export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000) |
31 |
| - # init is not executed for prebuilt workspaces and restarts, |
32 |
| - # so we should put all the heavy initialization here |
33 |
| - init: > |
34 |
| - cp sample.env .env && |
35 |
| - npm ci && |
36 |
| - gp sync-done npm-ci && |
37 |
| - gp await-port 27017 && |
38 |
| - npm run seed && |
39 |
| - mongo --eval "db.fsyncLock(); db.fsyncUnlock()" |
40 |
| - command: > |
41 |
| - npm run ensure-env && |
42 |
| - gp await-port 27017 && |
43 |
| - npm run develop:server |
| 30 | + - name: server |
| 31 | + before: export COOKIE_DOMAIN=gitpod.io && export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000) && export CYPRESS_BASE_URL=$(gp url 8000) |
| 32 | + # init is not executed for prebuilt workspaces and restarts, |
| 33 | + # so we should put all the heavy initialization here |
| 34 | + init: > |
| 35 | + cp sample.env .env && |
| 36 | + npm ci && |
| 37 | + gp sync-done npm-ci && |
| 38 | + gp await-port 27017 && |
| 39 | + npm run seed && |
| 40 | + mongo --eval "db.fsyncLock(); db.fsyncUnlock()" |
| 41 | + command: > |
| 42 | + npm run ensure-env && |
| 43 | + gp await-port 27017 && |
| 44 | + npm run develop:server |
44 | 45 |
|
45 |
| -- name: client |
46 |
| - before: export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000) |
47 |
| - init: > |
48 |
| - cd ./client && |
49 |
| - gp sync-await npm-ci && |
50 |
| - npm run prebuild && |
51 |
| - npm run build:workers && |
52 |
| - cd .. |
53 |
| - command: > |
54 |
| - gp await-port 3000 && |
55 |
| - cd ./client && |
56 |
| - npm run develop -- -H '0.0.0.0' |
57 |
| - openMode: split-right |
| 46 | + - name: client |
| 47 | + before: export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000) && export CYPRESS_BASE_URL=$(gp url 8000) |
| 48 | + init: > |
| 49 | + cd ./client && |
| 50 | + gp sync-await npm-ci && |
| 51 | + npm run prebuild && |
| 52 | + npm run build:workers && |
| 53 | + cd .. |
| 54 | + command: > |
| 55 | + gp await-port 3000 && |
| 56 | + cd ./client && |
| 57 | + npm run develop -- -H '0.0.0.0' |
| 58 | + openMode: split-right |
58 | 59 |
|
59 | 60 | github:
|
60 | 61 | prebuilds:
|
|
0 commit comments