Sign inSign up

arnau/nginx-gate

By arnau

•Updated over 8 years ago

Docker image with Nginx with Lua enabled on Alpine to guard endpoints using JWT.

Image
1

10M+

arnau/nginx-gate repository overview

⁠Nginx Gate

Docker image with Nginx with Lua enabled on Alpine to guard endpoints using JWT⁠.

⁠Credits

This is a mix of ideas and code coming from Auth0's nginx-jwt⁠ and SkyLothar's lua-resty-jwt⁠ so, many thanks to them for all the work done.

⁠Usage

docker run -d --name gate \
           --env JWT_SECRET=$(JWT_SECRET) \
           --env JWT_SECRET_IS_BASE64_ENCODED=true \
           -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf \
           -p 1080:80 \
           arnau/nginx-gate

⁠Development

To build and install the Gate:

make && make install

In summary, the above compiles the Docker image and starts it running on port 1080.

To test it, create a token and run try the secure endpoint:

make token # => eyJh...
make test-secure TOKEN=eyJh...

Tag summary

Content type

Image

Digest

Size

4.5 MB

Last updated

over 8 years ago

docker pull arnau/nginx-gate