by benwilber
GitHub Readme.md
(and Heroku-compatibles like Dokku)
nginx.conf
and the $LUA_PATH
/$LUA_CPATH
environment variablesopm.txt
and/or luarocks.txt
in your project's root directoryThe easiest way to get started with this buildpack is to check out the Hello World app.
Clone the Hello World app
$ git clone https://github.com/benwilber/heroku-openresty-hello-world.git
$ cd heroku-openresty-hello-world
Create a new Heroku app
$ heroku apps:create --stack=heroku-20 --buildpack=https://github.com/benwilber/heroku-openresty-buildpack.git
We have to add the heroku/python
buildpack as well so that we can compile the nginx.conf
template.
$ heroku buildpacks:add heroku/python
Push the app to Heroku
$ git push heroku master
Visiting the app's URL in your web browser will display "Hello OpenResty!"
This buildpack has been tested with the following Heroku stacks:
heroku-18
heroku-20
If you're interested in making a custom build of OpenResty then take a look at the Makefile in the root of this repository. OpenResty (and dependencies) are compiled in Docker running the target stack.
$ make build-heroku-20
You can modify the bin/build
file to add or modify how OpenResty is built. For instance, if you want to add additional NGINX modules.
Copy the snippet above into CLI.