docker build -t nominatim .
docker run -it --rm \
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
-e IMPORT_WIKIPEDIA=true
-p 5432:5432
-p 8080:8080
--name nominatim
nominatim
The configuration variables mean the following:
PBF_URL: Which OSM extract to download. Check https://download.geofabrik.deREPLICATION_URL: Where to get updates from. Also availble from Geofabrik.IMPORT_WIKIPEDIA: Whether to import the Wikipedia article and redirect dumps. On a beefy 10 core server this takes around 10 minutes.The port 8080 is the nominatim website port and 5432 is the Postgres port, which you may or may not want to expose.
There are two folders inside the contain the can be persistet across container creation and removal.
/app/ holds the state about whether the import was succesful and general nominatim config/var/lib/postgresql/11/main is the storage location of the Postgres databaseSo if you want to be able to kill your container and start it up again with all the data still present use the following command:
docker run -it --rm \
-e PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf \
-e REPLICATION_URL=http://download.geofabrik.de/europe/monaco-updates/ \
-e IMPORT_WIKIPEDIA=false
-v nominatim-data:/app
-v nominatim-postgres:/var/lib/postgresql/11/main
-p 5432:5432
-p 8080:8080
--name nominatim
nominatim
Full documentation for Nominatim update available here. For a list of other methods see the output of:
docker exec -it nominatim sudo -u postgres ./src/build/utils/update.php --help
The following command will keep your database constantly up to date:
docker exec -it nominatim sudo -u postgres ./src/build/utils/update.php --import-osmosis-all
If you have imported multiple country extracts and want to keep them up-to-date, have a look at the script in issue #60.
Content type
Image
Digest
Size
831.2 MB
Last updated
over 6 years ago
docker pull stadtnavi/nominatim