fix(tools): fix and accelerate automated gitpod dev setup (#36720)
* fix(tools): switch to official gitpod mongodb image * fix(tools): accelerate gitpod start-up by prebuilding the client * fix(tools): accelerate gitpod start-up by continuously prebuilding workspaces * fix(tools): add setup|automated badge with new fork-compatible gitpod url
This commit is contained in:
8
.gitpod.Dockerfile
vendored
8
.gitpod.Dockerfile
vendored
@ -1,8 +0,0 @@
|
|||||||
FROM gitpod/workspace-full
|
|
||||||
|
|
||||||
USER gitpod
|
|
||||||
WORKDIR $HOME
|
|
||||||
|
|
||||||
RUN wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.6.13.tgz && \
|
|
||||||
mkdir -p mongodb && \
|
|
||||||
tar xaf mongodb-linux-x86_64-ubuntu1604-3.6.13.tgz -C mongodb --strip-components=1
|
|
33
.gitpod.yml
33
.gitpod.yml
@ -1,5 +1,4 @@
|
|||||||
image:
|
image: gitpod/workspace-mongodb
|
||||||
file: .gitpod.Dockerfile
|
|
||||||
ports:
|
ports:
|
||||||
- port: 27017 # mongodb
|
- port: 27017 # mongodb
|
||||||
onOpen: ignore
|
onOpen: ignore
|
||||||
@ -17,7 +16,7 @@ tasks:
|
|||||||
# starting mongo in background, so it doesn't block prebuilds
|
# starting mongo in background, so it doesn't block prebuilds
|
||||||
before: >
|
before: >
|
||||||
mkdir -p /workspace/data &&
|
mkdir -p /workspace/data &&
|
||||||
(~/mongodb/bin/mongod --dbpath /workspace/data &)
|
(mongod --dbpath /workspace/data &)
|
||||||
|
|
||||||
- name: server
|
- name: server
|
||||||
before: export COOKIE_DOMAIN=gitpod.io && export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000)
|
before: export COOKIE_DOMAIN=gitpod.io && export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000)
|
||||||
@ -26,9 +25,10 @@ tasks:
|
|||||||
init: >
|
init: >
|
||||||
cp sample.env .env &&
|
cp sample.env .env &&
|
||||||
npm ci &&
|
npm ci &&
|
||||||
|
gp sync-done npm-ci &&
|
||||||
gp await-port 27017 &&
|
gp await-port 27017 &&
|
||||||
npm run seed &&
|
npm run seed &&
|
||||||
~/mongodb/bin/mongo --eval "db.fsyncLock(); db.fsyncUnlock()"
|
mongo --eval "db.fsyncLock(); db.fsyncUnlock()"
|
||||||
command: >
|
command: >
|
||||||
npm run ensure-env &&
|
npm run ensure-env &&
|
||||||
gp await-port 27017 &&
|
gp await-port 27017 &&
|
||||||
@ -36,8 +36,33 @@ tasks:
|
|||||||
|
|
||||||
- name: client
|
- name: client
|
||||||
before: export HOME_LOCATION=$(gp url 8000) && export API_LOCATION=$(gp url 3000)
|
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: >
|
command: >
|
||||||
gp await-port 3000 &&
|
gp await-port 3000 &&
|
||||||
cd ./client &&
|
cd ./client &&
|
||||||
npm run develop -- -H '0.0.0.0'
|
npm run develop -- -H '0.0.0.0'
|
||||||
openMode: split-right
|
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
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
[](http://makeapullrequest.com)
|
[](http://makeapullrequest.com)
|
||||||
[](http://www.firsttimersonly.com/)
|
[](http://www.firsttimersonly.com/)
|
||||||
[](https://www.codetriage.com/freecodecamp/freecodecamp)
|
[](https://www.codetriage.com/freecodecamp/freecodecamp)
|
||||||
|
[](https://gitpod.io/from-referrer/)
|
||||||
|
|
||||||
## Welcome to freeCodeCamp.org's open source codebase and curriculum!
|
## Welcome to freeCodeCamp.org's open source codebase and curriculum!
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user