Skip to content

Commit ac8ff11

Browse files
authored
Merge pull request #28 from nbently/master
nginx_http_geoip2 module support
2 parents 78080a6 + da67905 commit ac8ff11

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ RUN apt-get update \
1919
openssl unzip \
2020
wget \
2121
zlib1g-dev \
22-
git
22+
git \
23+
libmaxminddb-dev
2324

2425
# Lua build
2526
COPY ./scripts/build-lua /tmp/build-lua

scripts/build-openresty

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ YELLOW='\E[1;33m'
66
GREEN='\E[1;32m'
77
RESET='\E[0m'
88

9-
echo -e "${BLUE}${CYAN}Building OpenResty ${YELLOW}${OPENRESTY_VERSION}...${RESET}"
9+
echo -e "${BLUE}${CYAN}Building OpenResty ${YELLOW}${OPENRESTY_VERSION} with nginx_http_geoip2 module...${RESET}"
1010

1111
cd /tmp
1212
wget "https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz"
1313
tar -xzf openresty-${OPENRESTY_VERSION}.tar.gz
1414
mv /tmp/openresty-${OPENRESTY_VERSION} /tmp/openresty
15+
git clone https://github.com/leev/ngx_http_geoip2_module.git
16+
mv /tmp/ngx_http_geoip2_module /tmp/openresty/ngx_http_geoip2_module
1517
cd /tmp/openresty
1618

1719
./configure \
@@ -52,7 +54,8 @@ cd /tmp/openresty
5254
--with-stream \
5355
--with-stream_realip_module \
5456
--with-stream_ssl_module \
55-
--with-stream_ssl_preread_module
57+
--with-stream_ssl_preread_module \
58+
--add-dynamic-module=/tmp/openresty/ngx_http_geoip2_module
5659

5760
make -j2
5861

0 commit comments

Comments
 (0)