pa11y / pa11y-dashboard

Pa11y Dashboard is a web interface which helps you monitor the accessibility of your websites
https://pa11y.org
GNU General Public License v3.0
987 stars 181 forks source link

Add a "Deploy to Heroku" button #238

Open sjparkinson opened 5 years ago

sjparkinson commented 5 years ago

See https://devcenter.heroku.com/articles/heroku-button.

This button would live on the README.md and look something like:

image

Pressing it would allow anyone with a Heroku account to quickly set up a new Pa11y dashboard.

sjparkinson commented 5 years ago

More than happy to submit a PR for this if there is interest.

joeyciechanowicz commented 5 years ago

Thanks. This sounds really useful in theory.

Couple of questions:

sjparkinson commented 5 years ago
* Can heroku sites block all traffic except for whitelisted IPs?

Interesting question. Not out of the box. However I would imagine there is a Buildpack out there that we could make use of. I'll have a look around.

* How would this work with specify a `config.json` or ENV variables?

Environment variables are covered, and a configuration file I will have a look at how it works in this project first.

sjparkinson commented 5 years ago

Interesting question. Not out of the box. However I would imagine there is a Buildpack out there that we could make use of. I'll have a look around.

There is one robust answer to this which would be to provision the Heroku app inside a Heroku Private Space.

https://www.heroku.com/private-spaces

That would allow IP access lists to be defined and managed within Heroku, no maintenance required. There is an increased cost associated with provisioning an app in a Private Space however.

Spend Alert. Each Heroku Private Space costs $1000 in Add-on Credits/month (pro-rated to the second).

Buildpack wise, the route seems to be using an nginx based Buildpack configured with a list of IPs from a file. However the ones I've found all deal with static sites only. I'll dig into what one that supports this project would look like.


Configuration wise, looks like this would work just fine with the way the Heroku Deploy button supports asking for environment variables.

https://github.com/pa11y/pa11y-dashboard/blob/c7bd2a53b6b7fc63b9fd40790fd2b1c39d241dec/config.js#L28-L37

https://devcenter.heroku.com/articles/app-json-schema#env