processone / docker-ejabberd

Set of ejabberd Docker images
95 stars 77 forks source link

Add ImageMagick and captcha.sh #65

Closed marzzzello closed 3 years ago

marzzzello commented 3 years ago

Currently captchas are not possible because ImageMagick and captcha.sh are missing. Old issue: #48

badlop commented 3 years ago

Adding ImageMagick to the Docker image would increase size from 20 MB to 120 MB...

Maybe it's preferable to document how to download it, for those admins that want it?

From what I see, the minimal steps are something like this:

docker exec --user root ejabberd apk add imagemagick
docker exec --user root ejabberd wget -P /home/ejabberd/bin https://github.com/processone/ejabberd/raw/master/tools/captcha.sh
docker exec --user root ejabberd chmod +x /home/ejabberd/bin/captcha.sh

Then CAPTCHA can be configured in conf/ejabberd.yml like this:

captcha_cmd: /home/ejabberd/bin/captcha.sh
captcha_url: https://localhost:5443/captcha
marzzzello commented 3 years ago

ok that is better than what I had on my last try. I now get a captcha without text because a font is missing. After installing ghostscript-fonts it works :)