Skip to content

tkoenig/heroku-openresty-buildpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenResty Buildpack for Heroku

(and Heroku-compatibles like Dokku)

Features

  • Support for the full OpenResty suite including OPM and the Resty CLI
  • Built-in support for installing packages from LuaRocks
  • Full control of the top-level nginx.conf and the $LUA_PATH/$LUA_CPATH environment variables
  • Easily declare Lua dependencies by listing them in opm.txt and/or luarocks.txt in your project's root directory

Getting started

The easiest way to get started with this buildpack is to check out the Hello World app.

Basic usage

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 Lapis!"

Supported Heroku stacks

This buildpack has been tested with the following Heroku stacks:

  • heroku-16
  • heroku-18
  • heroku-20

Building OpenResty

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.

About

Heroku OpenResty Buildpack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 76.7%
  • Makefile 23.3%