Skip to content

Commit

Permalink
Update docs, remove build-essential
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Nov 11, 2024
1 parent 9fcfb15 commit 217effd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
strategy:
matrix:
nominatim:
- version: "4.3"
- version: "4.4"

- version: "4.5"

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
6 changes: 4 additions & 2 deletions 4.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down
26 changes: 13 additions & 13 deletions 4.5/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Nominatim Docker (Nominatim version 4.4)
# Nominatim Docker (Nominatim version 4.5)

## Table of contents

Expand Down Expand Up @@ -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.
Expand All @@ -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`)
Expand Down Expand Up @@ -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

Expand All @@ -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 \
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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_
Expand All @@ -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

Expand Down

0 comments on commit 217effd

Please # to comment.