merlinnot / nominatim-docker Goto Github PK
View Code? Open in Web Editor NEWFully-featured container for geocoding, reverse geocoding and address lookup based on Nominatim and Open Street Map data.
License: MIT License
Fully-featured container for geocoding, reverse geocoding and address lookup based on Nominatim and Open Street Map data.
License: MIT License
I intend to work on a v2 version and I'd love to hear your feedback and brainstorm some ideas.
What I have in mind is:
/nominatim
prefix for paths).HI, has anyone seen this error before (at end of log)? No other errors encountered before.
I tried twice on a clean Docker droplet :
...
ALTER SYSTEM SET full_page_writes TO 'off';
ALTER SYSTEM
ALTER SYSTEM SET logging_collector TO 'off';
ALTER SYSTEM
Would this instance work on a 12GB RAM/i5/1TB HDD laptop for whole planet data?
Would you go against setting it up on so much weaker hardware?
I've ran the build script as mentioned in README, and I get this error:
E: Package 'postgresql-9.6-postgis-scripts' has no installation candidate
A little more details:
Step 17/68 : USER root
---> Using cache
---> 57e6ed1b9d37
Step 18/68 : RUN apt-get install -y --no-install-recommends apache2 build-essential ca-certificates cmake curl g++ git libapache2-mod-php libboost-dev libboost-filesystem-dev libboost-python-dev libboost-system-dev libbz2-dev libexpat1-dev libgeos-dev libgeos++-dev libpq-dev libproj-dev libxml2-dev openssl osmosis php php-db php-intl php-pear php-pgsql postgresql-${PGSQL_VERSION}-postgis-${POSTGIS_VERSION} postgresql-${PGSQL_VERSION}-postgis-scripts postgresql-contrib-${PGSQL_VERSION} postgresql-server-dev-${PGSQL_VERSION} python python-pip python-setuptools sudo zlib1g-dev
---> Running in 3f7ab2d8c047
Reading package lists...
Building dependency tree...
Reading state information...
Package postgresql-9.6-postgis-scripts is a virtual package provided by:
postgresql-9.6-postgis-3-scripts 3.0.0+dfsg-2~exp1.pgdg16.04+1
postgresql-9.6-postgis-2.5-scripts 2.5.3+dfsg-2.pgdg16.04+1
E: Package 'postgresql-9.6-postgis-scripts' has no installation candidate
The command '/bin/sh -c apt-get install -y --no-install-recommends apache2 build-essential ca-certificates cmake curl g++ git libapache2-mod-php libboost-dev libboost-filesystem-dev libboost-python-dev libboost-system-dev libbz2-dev libexpat1-dev libgeos-dev libgeos++-dev libpq-dev libproj-dev libxml2-dev openssl osmosis php php-db php-intl php-pear php-pgsql postgresql-${PGSQL_VERSION}-postgis-${POSTGIS_VERSION} postgresql-${PGSQL_VERSION}-postgis-scripts postgresql-contrib-${PGSQL_VERSION} postgresql-server-dev-${PGSQL_VERSION} python python-pip python-setuptools sudo zlib1g-dev' returned a non-zero code: 100
docker build github.com/merlinnot/nominatim-docker -t nominatim --build-arg BUILD_THREADS=1 --build-arg BUILD_MEMORY=2GB --build-arg OSM2PGSQL_CACHE=1000 --build-arg PBF_URL=http://download.geofabrik.de/europe/monaco-latest.osm.pbf --build-arg REPLICATION_URL=http://download.geofabrik.de/monaco-updates
returns
"$libdir/postgis-2.5": No such file or directory
ERROR: pgsql returned with error code (3)
/srv/nominatim/Nominatim/nominatim/nominatim.py:307: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert(False, "Unreachable code")
Traceback (most recent call last):
File "/srv/nominatim/Nominatim/nominatim/nominatim.py", line 31, in
import psycopg2
ImportError: No module named 'psycopg2'
string(33) "error status 1 running nominatim!"
ERROR: error status 1 running nominatim!
First thank you for sharing this very nice docker project !
I have just a little question : is it possible to connecte to the postgre nominatim schema from outside the container ? (for port it is ok we can map it but for user and password do you have an idea ?)
I need to specify a connection string to photon that's why.
Thank you very much in advance
Tried this command per the documentation:
docker build github.com/merlinnot/nominatim-docker
-t test
--build-arg BUILD_THREADS=16
--build-arg BUILD_MEMORY=16GB
--build-arg OSM2PGSQL_CACHE=28000
--build-arg RUNTIME_THREADS=2
--build-arg RUNTIME_MEMORY=4GB
Ran for a while and then failed with this error on step 49:
Step 49/68 : RUN service postgresql start && sudo -u nominatim ${USERHOME}/Nominatim/build/utils/setup.php --osm-file /srv/nominatim/src/data.osm.pbf --all --threads ${BUILD_THREADS} --osm2pgsql-cache ${OSM2PGSQL_CACHE} && service postgresql stop
---> Running in 4ff1cb61c24b
That's an amazing project, thanks!
I'm having some trouble to figure out the proper way to run the built container.
The recommended command
docker run --restart=always -d -p 80:80 merlinnot/nominatim-docker
fails with the following message:
Unable to find image 'merlinnot/nominatim-docker:latest' locally
docker: Error response from daemon: manifest for merlinnot/nominatim-docker:latest not found.
See 'docker run --help'.
If I do:
sudo docker run --restart=always -d -p 80:80 nominatim
It works, but the base href on HTML is set to the container ID, like: <base href="http://457fa9e123ba/" />
So, there seem to be two problems here:
merlinnot/nominatim-docker
name doesn't work?CONST_Website_BaseURL
should have hostname?I was able to get around those problems by manually setting the container hostname:
sudo docker run --restart=always -h 222.22.111.111/nominatim -d -p 80:80 nominatim
Perhaps you want to document this?
I installed a nominatim server with germany-latest.osrm.pbf
so far so good
with some addresses my server has some problem while the nominatim.openstreetmap.org find the address.
any idea why?
post scriptum: can you also set up a nominatim server using a local merged pbf file?
After running:
docker build github.com/merlinnot/nominatim-docker \
-t nominatim \
--build-arg BUILD_THREADS=4 \
--build-arg BUILD_MEMORY=4GB \
--build-arg OSM2PGSQL_CACHE=28000 \
--build-arg RUNTIME_THREADS=2 \
--build-arg RUNTIME_MEMORY=4GB \
--build-arg PBF_URL="https://download.geofabrik.de/asia/maldives-latest.osm.pbf"
Step 18/68 : RUN apt-get install -y --no-install-recommends apache2 build-essential ca-certificates cmake curl g++ git libapache2-mod-php libboost-dev libboost-filesystem-dev libboost-python-dev libboost-system-dev libbz2-dev libexpat1-dev libgeos-dev libgeos++-dev libpq-dev libproj-dev libxml2-dev openssl osmosis php php-db php-intl php-pear php-pgsql postgresql-${PGSQL_VERSION}-postgis-${POSTGIS_VERSION} postgresql-${PGSQL_VERSION}-postgis-scripts postgresql-contrib-${PGSQL_VERSION} postgresql-server-dev-${PGSQL_VERSION} python python-pip python-setuptools sudo zlib1g-dev
---> Running in 2060a7f3f51f
Reading package lists...
Building dependency tree...
Reading state information...
Package postgresql-9.6-postgis-scripts is a virtual package provided by:
postgresql-9.6-postgis-3-scripts 3.0.0+dfsg-2~exp1.pgdg16.04+1
postgresql-9.6-postgis-2.5-scripts 2.5.3+dfsg-2.pgdg16.04+1
E: Package 'postgresql-9.6-postgis-scripts' has no installation candidate
The command '/bin/sh -c apt-get install -y --no-install-recommends apache2 build-essential ca-certificates cmake curl g++ git libapache2-mod-php libboost-dev libboost-filesystem-dev libboost-python-dev libboost-system-dev libbz2-dev libexpat1-dev libgeos-dev libgeos++-dev libpq-dev libproj-dev libxml2-dev openssl osmosis php php-db php-intl php-pear php-pgsql postgresql-${PGSQL_VERSION}-postgis-${POSTGIS_VERSION} postgresql-${PGSQL_VERSION}-postgis-scripts postgresql-contrib-${PGSQL_VERSION} postgresql-server-dev-${PGSQL_VERSION} python python-pip python-setuptools sudo zlib1g-dev' returned a non-zero code: 100
Hi @merlinnot ,
I got the error while building the docker file. Could you help to resolve it? I run with POSTGIS_VERSION=2.5
Best,
Thanh
Great solution - thanks!
One problem I have - after deployment into Azure docker container, it is working great, but no updates happening (I used configuration --build-arg REPLICATION_URL=http://download.geofabrik.de/north-america/us-south-updates )
Is there a step I am missing? Cron configuration?
when i launch the script with the monaco example i have this error :
2019-03-08 21:21:21 == module path: /srv/nominatim/Nominatim/build/module
2019-03-08 21:21:21 == Create DB
2019-03-08 21:21:23 == Setup DB
Postgres version found: 9.06
ERROR: could not access file "$libdir/postgis-2.5": No such file or directory
osm2pgsql version 0.96.0 (64 bit id space)
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=12000MB, maxblocks=192000*65536, allocation method=11
Mid: pgsql, cache=12000
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels
Parsing gazetteer style file '/srv/nominatim/Nominatim/settings/import-full.style'.
Using projection SRS 4326 (Latlong)
NOTICE: table "place" does not exist, skipping
Reading in file: /srv/nominatim/src/data.osm.pbf
Using PBF parser.
Processing: Node(358820k 707.7k/s) Way(0k 0.00k/s) Relation(0 0.00/s)string(7) "No Data"
ERROR: No Data
The command '/bin/sh -c service postgresql start && sudo -u nominatim ${USERHOME}/Nominatim/build/utils/setup.php --osm-file /srv/nominatim/src/data.osm.pbf --all --threads ${BUILD_THREADS} --osm2pgsql-cache ${OSM2PGSQL_CACHE} && service postgresql stop' returned a non-zero code: 255
Hi,
Unable to build nominatim planet when docker build process of
Step 35/68 : RUN curl -L ${PBF_URL} --create-dirs -o /srv/nominatim/src/data.osm.pbf
then ran into this issue.
ERROR: Error processing tar file(exit status 1): unexpected EOF
The machine info:
CPU: 8 core
MEM: 32GB
STORAGE: 10TB
Docker version:
Client:
Version: 18.06.0-ce
API version: 1.38
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:11:02 2018
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.0-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:09:05 2018
OS/Arch: linux/amd64
Experimental: false
Let me know if you need more info.
Thanks in advance.
Hi,
We are getting build failures with below error -
Reading in file: /srv/nominatim/src/data.osm.pbf
Using PBF parser.
Processing: Node(2727010k 385.4k/s) Way(0k 0.00k/s) Relation(0 0.00/s)Error executing external command: /srv/nominatim/Nominatim/build/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore --number-processes 1 -C 28000 -P 5432 -d nominatim /srv/nominatim/src/data.osm.pbf
ERROR: Error executing external command: /srv/nominatim/Nominatim/build/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore --number-processes 1 -C 28000 -P 5432 -d nominatim /srv/nominatim/src/data.osm.pbf
The command '/bin/sh -c service postgresql start && sudo -u nominatim ${USERHOME}/Nominatim/build/utils/setup.php --osm-file /srv/nominatim/src/data.osm.pbf --all --threads ${BUILD_THREADS} --osm2pgsql-cache ${OSM2PGSQL_CACHE} && service postgresql stop' returned a non-zero code: 255
Note - We are using below machine for the same -
RAM: 32GB
CORE: 8
STORAGE: 1TB
Build config:
BUILD_THREADS=16
BUILD_MEMORY=26GB
OSM2PGSQL_CACHE=20000
Please let me know if you need more info.
Thanks,
Currently the system uses PHP 7.0 which is EOL as of now.
Is it good to upgrade to 7.3?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.