docbrown/.gitpod.yml
Daniel Uber c3bfdc585d
Install foreman for procfile and setup appdomain in gitpod (#14612)
* Install foreman for procfile and setup appdomain for csrf in gitpod

Foreman was not installed (so bin/startup would fail fast).

Additionally, the APP_DOMAIN can be fetched from the `gp` utility to
get the url for port 3000

Since the .env file is read top down - it's easier to implement
appending the corrected value than to replace it at the beginning, but
I'm completely open to redoing this via a sed command or similar to
change the variable at the top (this would be less confusing for
anyone else dealing with the file).

* Ensure command executes as a series of commands

TODO: if this works move the echo commands into the setup section

* move .env setup commands to init section
2021-08-27 18:21:07 -05:00

50 lines
1.5 KiB
YAML

image:
file: .gitpod.dockerfile
ports:
- port: 3000
onOpen: ignore
- port: 3035
onOpen: ignore
- port: 5432
onOpen: ignore
- port: 6379
onOpen: ignore
tasks:
- name: Forem Server
before: |
redis-server &
init: >
cp .env_sample .env &&
echo "APP_DOMAIN=\"$(gp url 3000 | cut -f 3 -d /)\"" >> .env &&
echo 'APP_PROTOCOL="https://"' >> .env &&
gem install solargraph &&
gem install foreman &&
bin/setup
command: >
bin/startup
- command: >
gp await-port 3000 &&
printf "Waiting for Forem server ..." &&
until $(curl -sNL $(gp url 3000) | grep -q "DEV"); do printf '.'; sleep 5; done && echo "" &&
gp preview $(gp url 3000)
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 "Review in Gitpod" button as a comment to pull requests (defaults to true)
addComment: false
# add a "Review in Gitpod" button to pull requests (defaults to false)
addBadge: false
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: false
# add a check to pull requests (defaults to true)
addCheck: true