Skip to content

Commit

Permalink
fix(tools): fix and accelerate automated gitpod dev setup (freeCodeCa…
Browse files Browse the repository at this point in the history
…mp#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
  • Loading branch information
jankeromnes authored and raisedadead committed Aug 30, 2019
1 parent 879899f commit e9d753f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
8 changes: 0 additions & 8 deletions .gitpod.Dockerfile

This file was deleted.

33 changes: 29 additions & 4 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
image:
file: .gitpod.Dockerfile
image: gitpod/workspace-mongodb
ports:
- port: 27017 # mongodb
onOpen: ignore
Expand All @@ -17,7 +16,7 @@ tasks:
# starting mongo in background, so it doesn't block prebuilds
before: >
mkdir -p /workspace/data &&
(~/mongodb/bin/mongod --dbpath /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)
Expand All @@ -26,18 +25,44 @@ tasks:
init: >
cp sample.env .env &&
npm ci &&
gp sync-done npm-ci &&
gp await-port 27017 &&
npm run seed &&
~/mongodb/bin/mongo --eval "db.fsyncLock(); db.fsyncUnlock()"
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Pull Requests Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com)
[![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/)
[![Open Source Helpers](https://www.codetriage.com/freecodecamp/freecodecamp/badges/users.svg)](https://www.codetriage.com/freecodecamp/freecodecamp)
[![Setup Automated](https://img.shields.io/badge/setup-automated-blue?logo=gitpod)](https://gitpod.io/from-referrer/)

## Welcome to freeCodeCamp.org's open source codebase and curriculum!

Expand Down

0 comments on commit e9d753f

Please sign in to comment.