Skip to content

Nginx brotli support #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "modules/ngx_brotli"]
path = modules/ngx_brotli
url = https://github.com/google/ngx_brotli
7 changes: 7 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ RUN apt-get update \
zlib1g-dev \
git


# Copy modules
COPY ./modules /modules

# Lua build
COPY ./scripts/build-lua /tmp/build-lua
RUN /tmp/build-lua
Expand Down Expand Up @@ -66,6 +70,9 @@ RUN apt-get update \

COPY ./files/.bashrc /root/.bashrc

# Copy modules
COPY ./modules /modules

# Copy lua and luarocks builds from first image
COPY --from=nginxbuilder /tmp/lua /tmp/lua
COPY --from=nginxbuilder /tmp/luarocks /tmp/luarocks
Expand Down
2 changes: 2 additions & 0 deletions local-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export CROWDSEC_OPENRESTY_BOUNCER_VERSION=0.1.7
export LUA_VERSION=5.1.5
export LUAROCKS_VERSION=3.3.1

git submodule update --init

# Builds

echo -e "${BLUE}❯ ${CYAN}Building ${YELLOW}latest ${CYAN}...${RESET}"
Expand Down
1 change: 1 addition & 0 deletions modules/ngx_brotli
Submodule ngx_brotli added at 6e975b
3 changes: 2 additions & 1 deletion scripts/build-openresty
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ cd /tmp/openresty
--with-stream \
--with-stream_realip_module \
--with-stream_ssl_module \
--with-stream_ssl_preread_module
--with-stream_ssl_preread_module \
--add-module=/modules/ngx_brotli

make -j2

Expand Down
2 changes: 2 additions & 0 deletions scripts/buildx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ RESET='\E[0m'

echo -e "${BLUE}❯ ${CYAN}Building docker multiarch: ${YELLOW}${*}${RESET}"

git submodule update --init

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${DIR}/.."

Expand Down