When running a docker based install, and setting DISCOURSE_MAXMIND_LICENSE_KEY the image creation process aborts with this error:
/var/www/discourse/lib/discourse_ip_info.rb:48:in `mmdb_download': undefined method `path' for nil:NilClass (NoMethodError)
filename = File.basename(gz_file.path)
from /var/www/discourse/lib/tasks/maxminddb.rake:67:in `block (3 levels) in <main>'
from /var/www/discourse/lib/tasks/maxminddb.rake:65:in `each'
from /var/www/discourse/lib/tasks/maxminddb.rake:65:in `block (2 levels) in <main>'
When leaving DISCOURSE_MAXMIND_LICENSE_KEY empty, everything works fine.
Tested with versions: stable and tests-passed
The Maxmind license works – so both URLs provide access to the .mmdb files:
Since I have been having the same problem and can confirm that when clearing out the license key, my rebuild problems magically goes away.
I have even over a couple of days, tried my best to dig into the problem.
I think I have it right, but I might aswell be wrong.
During build, it seems like the mmdb files are missing, perhaps due to them not being present in the base image, or more likely, that they are being deleted and/or not even downloaded prior to them being loaded, hence the build fails…
Come to think of it, mmdb_download being called points to code trying to download the file.
I’ve successfully downloaded the files manually (from the within the docker container) with wget, so the license is working as expected.