wei / pull

🤖 Keep your forks up-to-date via automated PRs
https://github.com/apps/pull
MIT License
6.27k stars 661 forks source link

suggestion: Add docs for self-hosting #329

Open ajhalili2006 opened 3 years ago

ajhalili2006 commented 3 years ago

Currently at the time of writing, the pull.git.ci server is down. So I forked the repo into my org, configured config vars as per .env.example, deployed to Divio, and test if it's work. Config chaos may happen for first-timers who want to self-host stuff. Maybe add comments in the example dotenv file and also add some docs for deploying your own instance of the app?

wei commented 3 years ago

pull.git.ci is up and working just fine. You probably just didn't use https:// as provided in the README. You can see it's working by going to https://pull.git.ci/check/wei/pull or https://github.com/issues?q=author%3Aapp%2Fpull and look at all the pull requests being worked on every second.

I agree some docs may be helpful. The easiest way is to run using docker

  1. fill in .env, just APP_ID and WEBHOOK_SECRET is required
  2. download the private key for your GitHub app to pk.pem or include it as environment variable PRIVATE_KEY
  3. docker-compose up

See: https://github.com/wei/pull/blob/f5e10f6d2d82f3e999e5a6d73392e12ce356502b/Dockerfile#L14-L19

If you don't want to use docker, but rather run the node app directly, you can set the full PRIVATE_KEY environment variable in addition to APP_ID and WEBHOOK_SECRET. The command to run is npm start.

Some platforms have issues with env vars with new lines so probot also takes base64 encoding of your private key as environment variable.

PR welcome after trying out these steps~

ajhalili2006 commented 3 years ago

Also how about webhooks? Should I point GitHub to https://mypullghapphere.io/webhook as per WEBHOOK_PATH config?(I don't need smee.io since I deploying my instance on an non-Heroku service, e.g. Divio, but since Divio/Railway supports Dockerfiles, let's assume the Heroku deployment path minus the Heroku CLI.)

wei commented 3 years ago

Yes