Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lewis committed Jul 20, 2015
2 parents f710515 + 73e0039 commit 875a3c0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea/
*.orig
55 changes: 36 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,50 @@
# docker-nginx-lua
docker-nginx-lua
================

Dockerised Nginx with Lua module built from source - see http://wiki.nginx.org/HttpLuaModule#Installation
![Docker stars](https://img.shields.io/docker/stars/danday74/nginx-lua.png "Docker stars")
 
![Docker pulls](https://img.shields.io/docker/pulls/danday74/nginx-lua.png "Docker pulls")

Dockerised Nginx, with Lua module, built from source

The docker image is based on the manual compilation instructions at ...

http://wiki.nginx.org/HttpLuaModule#Installation

Useful for those who want Nginx with Lua but don't want to use OpenResty

# Automated
Automated
---------

The master branch on the github repo is watched by an automated docker build

The master branch on the github repo is watched by a docker automated build that builds the docker image <b>danday74/nginx-lua</b>
Which builds docker image **danday74/nginx-lua** on push to master

# Usage
Usage
-----

(1) Create your own dockerfile ...
1. Create your own Dockerfile ...

FROM: danday74/nginx-lua
COPY: /your/nginx.conf /nginx/conf/nginx.conf
```
FROM: danday74/nginx-lua
COPY: /your/nginx.conf /nginx/conf/nginx.conf
```
(2) Add this location block to your nginx.conf file
2. Add this location block to your **nginx.conf** file
location /hellolua {
content_by_lua '
ngx.header["Content-Type"] = "text/plain";
ngx.say("hello world");
';
}
```
location /hellolua {
content_by_lua '
ngx.header["Content-Type"] = "text/plain";
ngx.say("hello world");
';
}
```
INFO: If you don't have an nginx.conf file then use the one in the github repo which has this location block in it already (recommended)
If you don't have an **nginx.conf** file then use the one provided in the github repo
(3) Build your docker image
3. Build your docker image
(4) Run your docker container
4. Run your docker container - Remember to use **-p YOUR_PORT:80** in your docker run statement
(5) Visit http://your-docker-container/hellolua
5. Visit http://your-docker-container:YOUR_PORT/hellolua

0 comments on commit 875a3c0

Please sign in to comment.