2024-09-18 06:36:38 +00:00
|
|
|
image: ghcr.io/freecodecamp/gitpod:latest
|
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
|
2024-09-17 10:27:58 +00:00
|
|
|
- port: 8025 # MailHog
|
|
|
|
visibility: public
|
|
|
|
onOpen: ignore
|
|
|
|
- port: 1025 # MailHog
|
|
|
|
onOpen: ignore
|
|
|
|
- port: 9323 # Playwright
|
|
|
|
visibility: public
|
|
|
|
onOpen: ignore
|
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)
|
2024-01-19 00:19:49 +00:00
|
|
|
export CHALLENGE_EDITOR_API_LOCATION=$(gp url 3200)
|
2022-07-08 09:25:36 +00:00
|
|
|
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: >
|
2024-09-26 15:24:44 +00:00
|
|
|
cd api/tools &&
|
|
|
|
docker compose up -d
|
2019-08-06 15:58:07 +00:00
|
|
|
|
2021-02-05 05:44:02 +00:00
|
|
|
- name: server
|
2024-06-14 17:09:40 +00:00
|
|
|
before: export COOKIE_DOMAIN=gitpod.io && export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000)
|
2021-02-05 05:44:02 +00:00
|
|
|
# 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 &&
|
2024-09-26 15:24:44 +00:00
|
|
|
cd api &&
|
|
|
|
pnpm run develop
|
2019-08-06 15:58:07 +00:00
|
|
|
|
2021-02-05 05:44:02 +00:00
|
|
|
- name: client
|
2024-06-14 17:09:40 +00:00
|
|
|
before: export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000)
|
2021-02-05 05:44:02 +00:00
|
|
|
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
|