forked from danday74/docker-nginx-lua
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.idea/ | ||
*.orig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
 | ||
| ||
 | ||
|
||
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 |