Skip to content

Added both lua-resty-http lua plugin and Crowdsec-Openresty-Bouncer - #7

Merged
jc21 merged 11 commits into
NginxProxyManager:masterfrom
LePresidente:master
Mar 17, 2022
Merged

Added both lua-resty-http lua plugin and Crowdsec-Openresty-Bouncer#7
jc21 merged 11 commits into
NginxProxyManager:masterfrom
LePresidente:master

Conversation

@LePresidente

@LePresidente LePresidente commented Feb 21, 2022

Copy link
Copy Markdown
Contributor

Added both lua-resty-http lua plugin and Crowdsec-Openresty-Bouncer

Required for crowdsec-openresty-bouncer
@jc21

jc21 commented Feb 21, 2022

Copy link
Copy Markdown
Member

Docker Image for build 1 is available on DockerHub as:

  • nginxproxymanager/nginx-full:github-pr-7
  • nginxproxymanager/nginx-full:github-pr-7-node

@jc21

jc21 commented Feb 21, 2022

Copy link
Copy Markdown
Member

Docker Image for build 2 is available on DockerHub as:

  • nginxproxymanager/nginx-full:github-pr-7
  • nginxproxymanager/nginx-full:github-pr-7-node

Config files and templates are saved in /defaults/crowdsec A script in the main docker image will handle deployment.
@LePresidente LePresidente changed the title Added lua-resty-http plugin Added both lua-resty-http lua plugin and Crowdsec-Openresty-Bouncer Feb 22, 2022
Comment thread scripts/install-crowdsec_openresty_bouncer
Uninstall gettext since its not required after the crowdsec install.
@jc21

jc21 commented Mar 16, 2022

Copy link
Copy Markdown
Member

This is failing because you also need to see the version env var in the Jenkinsfile

@LePresidente

Copy link
Copy Markdown
Contributor Author

I think i got all the environment variables, not sure what i'm missing

@jc21

jc21 commented Mar 16, 2022

Copy link
Copy Markdown
Member

The build shows that the version is still not coming through to the install script, but I can't see why not. Very strange, I'm looking into it

Comment thread scripts/install-crowdsec_openresty_bouncer
GREEN='\E[1;32m'
RESET='\E[0m'

echo -e "${BLUE}❯ ${CYAN}Installing Crowdsec OpenResty Bouncer ${YELLOW}${CROWDSEC_OPENRESTY_BOUNCER_VERSION}...${RESET}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ${CROWDSEC_OPENRESTY_BOUNCER_VERSION:-} instead of ${CROWDSEC_OPENRESTY_BOUNCER_VERSION} so that the variable falls back to empty, it will be checked with my comment below


bash ./install.sh --NGINX_CONF_DIR=/etc/nginx/conf.d --LIB_PATH=/etc/nginx/lualib --CONFIG_PATH=/defaults/crowdsec --DATA_PATH=/defaults/crowdsec --docker
sed -i 's|ENABLED=.*|ENABLED=false|' /defaults/crowdsec/crowdsec-openresty-bouncer.conf
rm /tmp/crowdsec

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be

rm -rf /tmp/crowdsec

@jc21

jc21 commented Mar 16, 2022

Copy link
Copy Markdown
Member

The CI build failure was due to some restrictive permissions for changes by users outside of this project, that has been fixed. It's getting the variable now, but still failing, see my latest comments on the files.

@LePresidente

Copy link
Copy Markdown
Contributor Author

Thanks for the help trying to debug this, hopefully its sorted now

@jc21

jc21 commented Mar 17, 2022

Copy link
Copy Markdown
Member

Yep it's working, the failure is in an extended golang image. Go just released a new version and this is causing problems with some packages. I'll merge this anyway, the main images will push fine regardless.

@jc21
jc21 merged commit 952e3c0 into NginxProxyManager:master Mar 17, 2022
@jc21

jc21 commented Mar 31, 2022

Copy link
Copy Markdown
Member

I had to disable this here as the v2.9.17 release of NginxProxyManager that used this change caused out of control memory leak. It was reported by some users and then when I used that image it froze my server after climbing past 3gb. The v2.9.17 docker tag is still available for debugging.

@LePresidente

Copy link
Copy Markdown
Contributor Author

Ok i'll have a look and get back to you

@LePresidente

Copy link
Copy Markdown
Contributor Author

So either my server doesn't have enough hosts configurator or activity to catch this. I've gone through the code and can't find anything obvious causing the issue.

Does the memory leak happen at startup or over time when accessing the server?

@jc21

jc21 commented Apr 1, 2022

Copy link
Copy Markdown
Member

At startup. After nginx reloads as part of startup it takes 20secs for my server to freeze. I haven't tested with a clean slate though

@LePresidente

LePresidente commented Apr 1, 2022

Copy link
Copy Markdown
Contributor Author

Ok I see the spike it does clear itself on my server but something is definitely wrong. Will revert back when i find the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants