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
This commit is contained in:
Daniel Uber 2021-08-27 18:21:07 -05:00 committed by GitHub
parent 3f52089695
commit c3bfdc585d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,10 @@ tasks:
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