https://github.com/pelias/pelias
Pelias does geocoding (turns addresses, POIs, and administrative regions into coordinates), reverse geocoding (given coordinates, finds nearby POIs, addresses, neighborhood, city, county, state, country), full-text search, and autocompletion. You can also import CSV to use your own custom data.
I run it on an extra PC, where it powers about 20 twitter bots that turn lat/lon coordinates of aircraft into descriptions like "flying over Silver Lake, Los Angeles, 0.5 miles from Circus Liquor."
There are docker configs for the whole-planet DB as well as various countries or metro areas if you don't need the whole Earth. https://github.com/pelias/docker/tree/master/projects