The update-geoip script updates our GeoIP database during the Docker build to make sure that it is current. The GeoIP database is otherwise dated as of the last publish of the geoip-lite NPM package that we use.
The goal of this diff is to make it easier for me to iterate on code in the production Docker environment. Right now, because the update-geoip happens after the COPY . . step, it gets re-run after any change, which means I have to wait ~15 minutes to test any change.
In this diff, we move the update-geoip step earlier. But because that necessitates moving it before any Babel transpilation, we can no longer use our own update-geoip script. That script (which is deleted here) basically just strings together a getCommConfig call with a call to the underlying update-geoip script we get from the geoip-lite package.
So this diff ultimately does three things:
- Replaces the existing update-geoip script with a new one that only supports the Docker environment, but doesn't require any Babel transpilation
- Makes it so the update-geoip script is only called in the Docker environment
- Moves the update-geoip script invocation to an earlier step in the Docker build
I think it's fine that update-geoip only supports the Docker environment going forward. It takes a long time and isn't useful for the dev environment.