Skip to content
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

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

Merged
merged 11 commits into from
Mar 17, 2022

Conversation

LePresidente
Copy link
Contributor

@LePresidente LePresidente commented Feb 21, 2022

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

Required for crowdsec-openresty-bouncer
@jc21
Copy link
Member

jc21 commented Feb 21, 2022

Docker Image for build 1 is available on DockerHub as:

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

@jc21
Copy link
Member

jc21 commented Feb 21, 2022

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
Uninstall gettext since its not required after the crowdsec install.
@jc21
Copy link
Member

jc21 commented Mar 16, 2022

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

@LePresidente
Copy link
Contributor Author

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

@jc21
Copy link
Member

jc21 commented Mar 16, 2022

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

GREEN='\E[1;32m'
RESET='\E[0m'

echo -e "${BLUE}❯ ${CYAN}Installing Crowdsec OpenResty Bouncer ${YELLOW}${CROWDSEC_OPENRESTY_BOUNCER_VERSION}...${RESET}"
Copy link
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
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
Copy link
Member

jc21 commented Mar 16, 2022

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
Contributor Author

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

@jc21
Copy link
Member

jc21 commented Mar 17, 2022

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
Copy link
Member

jc21 commented Mar 31, 2022

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
Contributor Author

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

@LePresidente
Copy link
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
Copy link
Member

jc21 commented Apr 1, 2022

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
Copy link
Contributor Author

LePresidente commented Apr 1, 2022

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