mautic / docker-mautic

Docker Image for Mautic
https://www.mautic.org
377 stars 280 forks source link

[BUG] Bad cron for geoip db #171

Open madmath03 opened 4 years ago

madmath03 commented 4 years ago

https://github.com/mautic/docker-mautic/blob/492fc1bbf0e011d25ce357c648d5269f081714d7/common/mautic.crontab#L19-L20

It should be php /var/www/html/bin/console mautic:iplookup:download

--- Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/92652067-bug-bad-cron-for-geoip-db?utm_campaign=plugin&utm_content=tracker%2F20392502&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F20392502&utm_medium=issues&utm_source=github).
EnziinSystem commented 3 years ago

I solved it with the guide on the page:

https://mauteam.org/mautic/mautic-admins/solved-maxmind-geolite2-database-not-updating

And change Dockerfile to:

...
RUN apt-get update && wget https://github.com/maxmind/geoipupdate/releases/download/v4.6.0/geoipupdate_4.6.0_linux_amd64.deb \
    && dpkg -i geoipupdate_4.6.0_linux_amd64.deb && rm geoipupdate_4.6.0_linux_amd64.deb
...
COPY GeoIP.conf /etc/GeoIP.conf
...

And change cron file:

...
*/5 * * * *     www-data  geoipupdate -f /etc/GeoIP.conf -d /var/www/html/app/cache/ip_data > /var/log/cron.pipe 2>&1
...

Remember remove old cron:

...
#        0 4 15 * *     www-data   php /var/www/html/bin/console mautic:iplookup:download > /var/log/cron.pipe 2>&1
...