Skip to content

Instantly share code, notes, and snippets.

@gnsx
Last active June 2, 2021 07:28
Show Gist options
  • Save gnsx/76d01ebf5a8e351d23a5b8e99f707247 to your computer and use it in GitHub Desktop.
Save gnsx/76d01ebf5a8e351d23a5b8e99f707247 to your computer and use it in GitHub Desktop.
mkdir nominatimdata
cd nominatimdata
wget https://download.geofabrik.de/asia/sri-lanka-latest.osm.pbf
wget https://download.geofabrik.de/asia/india-latest.osm.pbf
wget https://download.geofabrik.de/asia/bangladesh-latest.osm.pbf
wget https://download.geofabrik.de/asia/nepal-latest.osm.pbf
osmconvert bangladesh-latest.osm.pbf --out-o5m | osmconvert - nepal-latest.osm.pbf -o=bang-nep.pbf
osmconvert bang-nep.pbf --out-o5m | osmconvert - sri-lanka-latest.osm.pbf -o=bang-nep-sl.pbf
osmconvert bang-nep-sl.pbf --out-o5m | osmconvert - india-latest.osm.pbf -o=ind-bang-nep-sl.pbf
rm bangladesh-latest.osm.pbf
rm nepal-latest.osm.pbf
rm sri-lanka-latest.osm.pbf
rm india-latest.osm.pbf
rm bang-nep.pbf
rm bang-nep-sl.pbf
cd..
git clone https://github.com/mediagis/nominatim-docker.git
cd nominatim-docker
cd 3.5
sudo docker build --pull --rm -t nominatim .
cd
sudo docker run -t -v /home/ubuntu/mts/nominatimdata:/data nominatim sh /app/init.sh /data/ind-bang-nep-sl.pbf postgresdata 4
sudo docker run --restart=always -p 6432:5432 -p 7070:8080 -d --name nominatim -v /home/ubuntu/mts/nominatimdata/postgresdata:/var/lib/postgresql/12/main nominatim bash /app/start.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment