2023-02-14 15:54:33 +00:00
|
|
|
image:
|
|
|
|
file: .gitpod.Dockerfile
|
2019-08-06 15:58:07 +00:00
|
|
|
ports:
|
2021-02-05 05:44:02 +00:00
|
|
|
- port: 27017 # mongodb
|
|
|
|
onOpen: ignore
|
|
|
|
- port: 8000 # client
|
2022-05-17 16:30:07 +00:00
|
|
|
onOpen: notify
|
2021-07-01 19:12:39 +00:00
|
|
|
visibility: public
|
2021-02-05 05:44:02 +00:00
|
|
|
- port: 9228 # node debug
|
|
|
|
onOpen: ignore
|
|
|
|
- port: 3000 # api
|
|
|
|
onOpen: ignore
|
2021-07-01 19:12:39 +00:00
|
|
|
visibility: public
|
2021-02-05 05:44:02 +00:00
|
|
|
- port: 9229 # node debug
|
|
|
|
onOpen: ignore
|
2021-03-30 07:55:30 +00:00
|
|
|
- port: 9230 # client node debug
|
|
|
|
onOpen: ignore
|
2022-07-08 09:25:36 +00:00
|
|
|
- port: 3200 # challenge editor api
|
|
|
|
visibility: public
|
|
|
|
- port: 3300 # challenge editor client
|
|
|
|
visibility: public
|
2019-08-06 15:58:07 +00:00
|
|
|
|
|
|
|
tasks:
|
2021-02-05 05:44:02 +00:00
|
|
|
- before: |
|
|
|
|
echo '
|
|
|
|
export COOKIE_DOMAIN=gitpod.io
|
|
|
|
export HOME_LOCATION=$(gp url 8000)
|
|
|
|
export API_LOCATION=$(gp url 3000)
|
|
|
|
export CYPRESS_BASE_URL=$(gp url 8000)
|
2022-07-08 09:25:36 +00:00
|
|
|
export REACT_APP_CHALLENGE_EDITOR_API_LOCATION=$(gp url 3200)
|
|
|
|
export CHALLENGE_EDITOR_CLIENT_LOCATION=$(gp url 3300)
|
2021-02-05 05:44:02 +00:00
|
|
|
' >> ~/.bashrc;
|
|
|
|
exit;
|
2020-07-23 14:22:09 +00:00
|
|
|
|
2021-02-05 05:44:02 +00:00
|
|
|
- name: db
|
2023-04-10 15:11:31 +00:00
|
|
|
# starting mongod in background, so it doesn't block prebuilds
|
2021-02-05 05:44:02 +00:00
|
|
|
before: >
|
|
|
|
mkdir -p /workspace/data &&
|
|
|
|
(mongod --dbpath /workspace/data &)
|
2019-08-06 15:58:07 +00:00
|
|
|
|
2021-02-05 05:44:02 +00:00
|
|
|
- name: server
|
|
|
|
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)
|
|
|
|
# init is not executed for prebuilt workspaces and restarts,
|
|
|
|
# so we should put all the heavy initialization here
|
|
|
|
init: >
|
|
|
|
cp sample.env .env &&
|
2023-03-02 18:17:44 +00:00
|
|
|
pnpm install &&
|
|
|
|
gp sync-done pnpm-install &&
|
2023-08-06 07:09:21 +00:00
|
|
|
pnpm run build:curriculum &&
|
2023-03-23 19:31:43 +00:00
|
|
|
gp ports await 27017
|
2021-02-05 05:44:02 +00:00
|
|
|
command: >
|
2023-03-23 19:31:43 +00:00
|
|
|
pnpm run seed &&
|
2023-04-10 15:11:31 +00:00
|
|
|
mongosh --eval "db.fsyncLock(); db.fsyncUnlock()" &&
|
2022-09-20 14:45:22 +00:00
|
|
|
gp ports await 27017 &&
|
2023-03-02 18:17:44 +00:00
|
|
|
pnpm run develop:server
|
2019-08-06 15:58:07 +00:00
|
|
|
|
2021-02-05 05:44:02 +00:00
|
|
|
- name: client
|
|
|
|
before: export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000) && export CYPRESS_BASE_URL=$(gp url 8000)
|
|
|
|
init: >
|
|
|
|
cd ./client &&
|
2023-03-02 18:17:44 +00:00
|
|
|
gp sync-await pnpm-install &&
|
2021-02-05 05:44:02 +00:00
|
|
|
cd ..
|
|
|
|
command: >
|
2022-09-20 14:45:22 +00:00
|
|
|
gp ports await 3000 &&
|
2023-08-05 15:43:13 +00:00
|
|
|
pnpm run develop:client -- -H '0.0.0.0'
|
2021-02-05 05:44:02 +00:00
|
|
|
openMode: split-right
|
2019-08-30 09:42:13 +00:00
|
|
|
|
2020-05-25 08:17:48 +00:00
|
|
|
vscode:
|
|
|
|
extensions:
|
2023-03-09 14:36:48 +00:00
|
|
|
- dbaeumer.vscode-eslint
|
|
|
|
- esbenp.prettier-vscode
|