Giter Club home page Giter Club logo

nominatim-docker's Introduction

Nominatim Docker - Differences from mediagis/nominatim-docker

Container for Nominatim.

I'm building this for use in an automatic deployment system. As such, this is custom built to fit my requirements, and may or may not be useful to you.

This has been modified to allow for easy mounting of a separate data volume.

This has been modified to allow for building of the data on the data volume easily, using command line parameters to docker. I need to be able to build pieces of the nominatim dataset repeatedly, and this is very convenient to be able to build only the chunks of data that are required for a specific deployment.

With a collection of snapshot images stored of various data volumes, it is easy to deploy a running instance for a specific dataset, without incurring the downsides of having a complete nominatim database running on a host that doesn't need it -- storage space and memory requirements, particularly.

Country

To check that everything is set up correctly, download and load to Postgres PBF file with minimal size - Europe/Monacco (latest) from geofabrik.de.

If a different country should be used you can set PBF_DATA on build.

  1. Clone repository
# git clone [email protected]:ericblade/nominatim-docker.git
# cd nominatim-docker/2.5
  1. Configure incremental update in the file local.php. By default CONST_Replication_Url is configured for Monaco. If you want a different update source, you will need to change CONST_Replication_Url in local.php. Documentation [here] (https://github.com/twain47/Nominatim/blob/master/docs/Import_and_update.md#updates). For example, to use the daily country extracts diffs for Gemany from geofabrik add the following:
@define('CONST_Replication_Url', 'http://download.geofabrik.de/europe/germany-updates');

California map updates: http://download.geofabrik.de/north-america/us/california-updates/

  1. Build Container
docker build -t nominatim .
  1. Create Database Assume you have a volume mounted for your postgresql at /mnt/postgresql, otherwise change the path in -v, also change the path to the .osm.pbf file if you're intending on using a different set of source data.
docker run -v /mnt/postgresql:/var/lib/postgresql --name nominatim nominatim --createdb http://download.geofabrik.de/europe/monaco-latest.osm.pbf

California map data: http://download.geofabrik.de/north-america/us/california-latest.osm.pbf

  1. Run Assume you have a volume mounted for your postgresql at /mnt/postgresql, otherwise change the path in -v.
docker run -v /mnt/postgresql:/var/lib/postgresql --restart=always -d -p 8080:8080 nominatim

If this succeeds, open http://localhost:8080/ in a web browser

Running

You can run Docker image from docker hub.

docker run -v /mnt/postgresql:/var/lib/postgresql --name nominatim mediagis/nominatim:latest --createdb http://download.geofabrik.de/europe/monaco-latest.osm.pbf
docker run -v /mnt/postgresql:/var/lib/postgresql --restart=always -d -p 8080:8080 --name nominatim mediagis/nominatim:latest

Service will run on http://localhost:8080/

Update

Full documentation for Nominatim update available here. For a list of other methods see the output of:

docker exec -it nominatim sudo -u nominatim ./src/utils/update.php --help

The following command will keep your database constantly up to date:

docker exec -it nominatim sudo -u nominatim ./src/utils/update.php --import-osmosis-all --no-npi

If you have imported multiple country extracts and want to keep them up-to-date, have a look at the script in issue #60.

nominatim-docker's People

Contributors

winsento avatar ericblade avatar aclowkey avatar thomasnordquist avatar timnon avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.