apex / up

Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS.
https://up.docs.apex.sh
MIT License
8.79k stars 377 forks source link

Procfile / Heroku Buildpack Support #299

Open sudhirj opened 7 years ago

sudhirj commented 7 years ago

up could theoretically support deploying the output of any Heroku buildpack, assuming it was built in the correct environment and had the web section of the Procfile running as just ./server

If up were to parse the Procfile and use the web section command to start the server, then it's actually possible to run the output of any Heroku buildpack and piggyback on that ecosystem. The PORT requirement is already in play there as well, so that's not a problem.

sudhirj commented 7 years ago

For reference: Info about the standard and how it works, including the directory of a ton of existing packs: https://www.heroku.com/elements/buildpacks

Tools to run any buildpack locally / programatically: https://github.com/progrium/buildstep

Getting this far on a proper Lambda environment as described here should result in a directory that can be zipped and deployed to lambda using up. This is necessary for cases where code is compiled / native extensions are built and your local laptop architecture differs from Lambda. Cross compiling for linux/amd64 is super easy is Go and other systems, but not all.

Procfile parsing in Go: https://github.com/ddollar/forego/blob/master/procfile.go - can use the web section of the Procfile (if available) instead of assuming ./server.

tj commented 7 years ago

@sudhirj awesomeee thanks man!