From 217effd57540654a5c9fb368fdca585e9f6b9de9 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 11 Nov 2024 18:03:29 +0100 Subject: [PATCH] Update docs, remove build-essential --- .github/workflows/ci.yml | 4 ++-- 4.5/Dockerfile | 6 ++++-- 4.5/README.md | 26 +++++++++++++------------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c50429..29f8a0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,9 @@ jobs: strategy: matrix: nominatim: - - version: "4.3" - version: "4.4" - + - version: "4.5" + runs-on: ubuntu-latest steps: - name: Checkout diff --git a/4.5/Dockerfile b/4.5/Dockerfile index aa48274..ce382fb 100644 --- a/4.5/Dockerfile +++ b/4.5/Dockerfile @@ -29,10 +29,11 @@ RUN \ -o APT::Install-Suggests="false" \ # Build tools from sources. \ build-essential \ - python3-dev \ osm2pgsql \ pkg-config \ - libicu-dev python3-pip \ + libicu-dev \ + python3-dev \ + python3-pip \ # PostgreSQL. postgresql-contrib \ postgresql-server-dev-16 \ @@ -69,6 +70,7 @@ RUN pip install --break-system-packages \ RUN true \ # Remove development and unused packages. && apt-get -y remove --purge --auto-remove \ + build-essential \ postgresql-server-dev-16 \ # Clear temporary files and directories. && rm -rf \ diff --git a/4.5/README.md b/4.5/README.md index 506e1d7..12d436e 100644 --- a/4.5/README.md +++ b/4.5/README.md @@ -1,4 +1,4 @@ -# Nominatim Docker (Nominatim version 4.4) +# Nominatim Docker (Nominatim version 4.5) ## Table of contents @@ -30,7 +30,7 @@ docker run -it \ -e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \ -p 8080:8080 \ --name nominatim \ - mediagis/nominatim:4.4 + mediagis/nominatim:4.5 ``` Port 8080 is the nominatim HTTP API port and 5432 is the Postgres port, which you may or may not want to expose. @@ -54,7 +54,7 @@ Other places at Geofabrik follow the pattern `https://download.geofabrik.de/$CON - `REPLICATION_UPDATE_INTERVAL`: How often upstream publishes diffs (in seconds, default: `86400`). _Requires `REPLICATION_URL` to be set._ - `REPLICATION_RECHECK_INTERVAL`: How long to sleep if no update found yet (in seconds, default: `900`). _Requires `REPLICATION_URL` to be set._ -- `UPDATE_MODE`: How to run replication to [update nominatim data](https://nominatim.org/release-docs/4.4.1/admin/Update/#updating-nominatim). Options: `continuous`/`once`/`catch-up`/`none` (default: `none`) +- `UPDATE_MODE`: How to run replication to [update nominatim data](https://nominatim.org/release-docs/4.5.0/admin/Update/#updating-nominatim). Options: `continuous`/`once`/`catch-up`/`none` (default: `none`) - `FREEZE`: Freeze database and disable dynamic updates to save space. (default: `false`) - `REVERSE_ONLY`: If you only want to use the Nominatim database for reverse lookups. (default: `false`) - `IMPORT_WIKIPEDIA`: Whether to download and import the Wikipedia importance dumps (`true`) or path to importance dump in the container. Importance dumps improve the scoring of results. On a beefy 10 core server, this takes around 5 minutes. (default: `false`) @@ -82,7 +82,7 @@ The following environment variables are available to tune PostgreSQL: - `POSTGRES_CHECKPOINT_TIMEOUT` (default: `10min`) - `POSTGRES_CHECKPOINT_COMPLETION_TARGET` (default: `0.9`) -See https://nominatim.org/release-docs/4.4.1/admin/Installation/#tuning-the-postgresql-database for more details on those settings. +See https://nominatim.org/release-docs/4.5.0/admin/Installation/#tuning-the-postgresql-database for more details on those settings. ### Import Style @@ -98,11 +98,11 @@ Available options are : - `full`: Default style that also includes points of interest. - `extratags`: Like the full style but also adds most of the OSM tags into the extratags column. -See https://nominatim.org/release-docs/4.4.1/admin/Import/#filtering-imported-data for more details on those styles. +See https://nominatim.org/release-docs/4.5.0/admin/Import/#filtering-imported-data for more details on those styles. ### Flatnode files -In addition you can also mount a volume / bind-mount on `/nominatim/flatnode` (see: Persistent container data) to use flatnode storage. This is advised for bigger imports (Europe, North America etc.), see: https://nominatim.org/release-docs/4.4.1/admin/Import/#flatnode-files. If the mount is available for the container, the flatnode configuration is automatically set and used. +In addition you can also mount a volume / bind-mount on `/nominatim/flatnode` (see: Persistent container data) to use flatnode storage. This is advised for bigger imports (Europe, North America etc.), see: https://nominatim.org/release-docs/4.5.0/admin/Import/#flatnode-files. If the mount is available for the container, the flatnode configuration is automatically set and used. ```sh docker run -it \ @@ -111,7 +111,7 @@ docker run -it \ -e REPLICATION_URL=https://download.geofabrik.de/europe/monaco-updates/ \ -p 8080:8080 \ --name nominatim \ - mediagis/nominatim:4.4 + mediagis/nominatim:4.5 ``` ### Configuration Example @@ -137,7 +137,7 @@ docker run -it --shm-size=1g \ -v nominatim-data:/var/lib/postgresql/16/main \ -p 8080:8080 \ --name nominatim \ - mediagis/nominatim:4.4 + mediagis/nominatim:4.5 ``` ## OpenStreetMap Data Extracts @@ -160,14 +160,14 @@ docker run -it \ -p 8080:8080 \ -v /osm-maps/data:/nominatim/data \ --name nominatim \ - mediagis/nominatim:4.4 + mediagis/nominatim:4.5 ``` where the _/osm-maps/data/_ directory contains _monaco-latest.osm.pbf_ file that is mounted and available in container: _/nominatim/data/monaco-latest.osm.pbf_ ## Updating the database -Full documentation for Nominatim update available [here](https://nominatim.org/release-docs/4.4.1/admin/Update/). For a list of other methods see the output of: +Full documentation for Nominatim update available [here](https://nominatim.org/release-docs/4.5.0/admin/Update/). For a list of other methods see the output of: ```sh docker exec -it nominatim sudo -u nominatim nominatim replication --help @@ -191,7 +191,7 @@ docker run -it \ -p 8080:8080 \ -v /osm-maps/data:/nominatim/data \ --name nominatim \ - mediagis/nominatim:4.4 + mediagis/nominatim:4.5 ``` where the _/osm-maps/data/_ directory contains _merged.osm.pbf_ file that is mounted and available in container: _/nominatim/data/merged.osm.pbf_ @@ -207,12 +207,12 @@ docker run -it \ -p 8080:8080 \ -v /osm-maps/extras:/nominatim/extras \ --name nominatim \ - mediagis/nominatim:4.4 + mediagis/nominatim:4.5 ``` Where the path to the importance dump is given relative to the container. (The file does not need to be named `wikimedia-importance.sql.gz`.) The same works for `IMPORT_US_POSTCODES` and `IMPORT_GB_POSTCODES`. -For more information about the Tiger address file, see [Installing TIGER housenumber data for the US](https://nominatim.org/release-docs/4.4.1/customize/Tiger/). +For more information about the Tiger address file, see [Installing TIGER housenumber data for the US](https://nominatim.org/release-docs/4.5.0/customize/Tiger/). ## Development