Closed clone1018 closed 7 years ago
Not ready yet! Doing work on the documentation now.
Ready to review!
I don't see why this "post/pre"install step is needed at all if README is right saying that "The heroku/nodejs buildpack will then npm build the sources and save them in www. "
The heroku buildpack only saves the sources in www
because we tell it to with the postinstall. Without that we would need to install some kind of temporary Procfile.
What does "npm install" do exactly? Can we just add build step as:
"install": "npm build & npm install",
Or it will fail as a recursive dependency?
My point of confusion is that npm install
on package.json
is about installing dependencies. Not about installing the package itself, right? Because if it is about installing package itself, there should be a package build step between installing dependencies and installing built package.
Well I'm definitely not a master. What can we do better and how should we improve this?
I don't know yet. Let's fix tests first - https://github.com/gratipay/grtp.co/issues/170 - and think about this later.
P.S. I wish we had less vendor lockin, but going to Heroku is an awesome step compared to Nginx and SSH config before.
This pull request is what we need to move grtp.co to Heroku, besides the actual inside-heroku setup.
The grtp.co Heroku setup is two buildpacks in a specific order:
And adding a
postinstall
ofmake build
. So really what's happening is heroku is installing nodejs for the build and then a simple nginx server serves up thewww/
directoryHere's a demo: https://grtp.herokuapp.com/v2.js
Deployment is now
git push heroku master