tar -czvf openresty-1.9.15.1-heroku-build.tar.gz openresty-heroku-build openresty-1.9.15.1
Commit openresty-1.9.15.1-heroku-build.tar.gz to your fork of the heroku-ember-cli-buildpack repo
Update bin/compile and bin/boot.sh in your fork of the heroku-ember-cli-buildpack repo to use the new openresty version
Changes to bin/boot.sh:
Need to add in an EXPORT for Lua: export LD_LIBRARY_PATH=$HOME/vendor/openresty-1.9.15.1/build/luajit-root/app/vendor/openresty-heroku-build/luajit/lib:$LD_LIBRARY_PATH
Change the path for execing nginx
Changes to bin/compile:
Extract the Openresty build from the repository instead of curling the Nginx build
This isn't a bug, I just wanted to document this here in case anyone else is curious about how to do this.
Basically, I needed to get Nginx with Lua running with this buildpack so I decided to use Openresty.
To build Openresty for Heroku:
Changes to bin/boot.sh:
export LD_LIBRARY_PATH=$HOME/vendor/openresty-1.9.15.1/build/luajit-root/app/vendor/openresty-heroku-build/luajit/lib:$LD_LIBRARY_PATH
exec
ing nginxChanges to bin/compile:
curl
ing the Nginx buildYou can see my end result in this commit: https://github.com/danconnell/heroku-buildpack-ember-cli/commit/3ba22439e09e0f7b347b6e52f83de3f2adaaee57
You can then use Lua commands in your nginx config like so: