diff --git a/projects/bangladesh/README.md b/projects/bangladesh/README.md new file mode 100644 index 00000000..4b4728e8 --- /dev/null +++ b/projects/bangladesh/README.md @@ -0,0 +1,34 @@ + +# Bangladesh 🇧🇩 + +This project is configured to download/prepare/build a complete Pelias installation for Bangladesh. Most densed area in the world. + +# Setup + +Please refer to the instructions at https://github.com/pelias/docker in order to install and configure your docker environment. + +The minimum configuration required in order to run this project are [installing prerequisites](https://github.com/pelias/docker#prerequisites), [install the pelias command](https://github.com/pelias/docker#installing-the-pelias-command) and [configure the environment](https://github.com/pelias/docker#configure-environment). + +Please ensure that's all working fine before continuing. + +# Run a Build + +To run a complete build, execute the following commands: + +```bash +pelias compose pull +pelias elastic start +pelias elastic wait +pelias elastic create +pelias download all +pelias prepare all +pelias import all +pelias compose up +pelias test run +``` + +# Make an Example Query + +You can now make queries against your new Pelias build: + +http://localhost:4000/v1/search?text=dhaka diff --git a/projects/bangladesh/docker-compose.yml b/projects/bangladesh/docker-compose.yml new file mode 100644 index 00000000..6dd43727 --- /dev/null +++ b/projects/bangladesh/docker-compose.yml @@ -0,0 +1,136 @@ +version: '3' +networks: + default: + driver: bridge +services: + libpostal: + image: pelias/libpostal-service + container_name: pelias_libpostal + user: "${DOCKER_USER}" + restart: always + ports: [ "127.0.0.1:4400:4400" ] + schema: + image: pelias/schema:master + container_name: pelias_schema + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + api: + image: pelias/api:master + container_name: pelias_api + user: "${DOCKER_USER}" + restart: always + environment: [ "PORT=4000" ] + ports: [ "0.0.0.0:4000:4000" ] + volumes: + - "./pelias.json:/code/pelias.json" + placeholder: + image: pelias/placeholder:master + container_name: pelias_placeholder + user: "${DOCKER_USER}" + restart: always + environment: [ "PORT=4100" ] + ports: [ "127.0.0.1:4100:4100" ] + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + - "./blacklist/:/data/blacklist" + whosonfirst: + image: pelias/whosonfirst:master + container_name: pelias_whosonfirst + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + - "./blacklist/:/data/blacklist" + openstreetmap: + image: pelias/openstreetmap:master + container_name: pelias_openstreetmap + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + - "./blacklist/:/data/blacklist" + openaddresses: + image: pelias/openaddresses:master + container_name: pelias_openaddresses + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + - "./blacklist/:/data/blacklist" + transit: + image: pelias/transit:master + container_name: pelias_transit + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + csv-importer: + image: pelias/csv-importer:master + container_name: pelias_csv_importer + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + - "./blacklist/:/data/blacklist" + polylines: + image: pelias/polylines:master + container_name: pelias_polylines + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + geonames: + image: pelias/geonames:master + container_name: pelias_geonames + user: "${DOCKER_USER}" + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + - "./blacklist/:/data/blacklist" + interpolation: + image: pelias/interpolation:master + container_name: pelias_interpolation + user: "${DOCKER_USER}" + restart: always + environment: [ "PORT=4300" ] + ports: [ "127.0.0.1:4300:4300" ] + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + pip: + image: pelias/pip-service:master + container_name: pelias_pip-service + user: "${DOCKER_USER}" + restart: always + environment: [ "PORT=4200" ] + ports: [ "127.0.0.1:4200:4200" ] + volumes: + - "./pelias.json:/code/pelias.json" + - "${DATA_DIR}:/data" + elasticsearch: + image: pelias/elasticsearch:7.16.1 + container_name: pelias_elasticsearch + user: "${DOCKER_USER}" + restart: always + ports: [ "127.0.0.1:9200:9200", "127.0.0.1:9300:9300" ] + volumes: + - "${DATA_DIR}/elasticsearch:/usr/share/elasticsearch/data" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + cap_add: [ "IPC_LOCK" ] + fuzzy-tester: + image: pelias/fuzzy-tester:master + container_name: pelias_fuzzy_tester + user: "${DOCKER_USER}" + restart: "no" + command: "--help" + volumes: + - "./pelias.json:/code/pelias.json" + - "./test_cases:/code/pelias/fuzzy-tester/test_cases" diff --git a/projects/bangladesh/pelias.json b/projects/bangladesh/pelias.json new file mode 100644 index 00000000..f8156a93 --- /dev/null +++ b/projects/bangladesh/pelias.json @@ -0,0 +1,87 @@ +{ + "logger": { + "level": "info", + "timestamp": false + }, + "esclient": { + "apiVersion": "7.5", + "hosts": [ + { "host": "elasticsearch" } + ] + }, + "elasticsearch": { + "settings": { + "index": { + "refresh_interval": "10s", + "number_of_replicas": "0", + "number_of_shards": "1" + } + } + }, + "acceptance-tests": { + "endpoints": { + "docker": "http://api:4000/v1/" + } + }, + "api": { + "services": { + "placeholder": { "url": "http://placeholder:4100" }, + "pip": { "url": "http://pip:4200" }, + "interpolation": { "url": "http://interpolation:4300" }, + "libpostal": { "url": "http://libpostal:4400" } + }, + "defaultParameters": { + "focus.point.lat": 23.78, + "focus.point.lon": 90.34 + } + }, + "imports": { + "adminLookup": { + "enabled": true + }, + "blacklist": { + "files": [ + ] + }, + "csv": { + "datapath": "/data/csv", + "files": [], + "download": [ + ] + }, + "geonames": { + "datapath": "/data/geonames", + "countryCode": "BD" + }, + "openstreetmap": { + "download": [ + { "sourceURL": "https://download.geofabrik.de/asia/bangladesh-latest.osm.pbf" } + ], + "leveldbpath": "/tmp", + "datapath": "/data/openstreetmap", + "import": [{ + "filename": "bangladesh-latest.osm.pbf" + }] + }, + "openaddresses": { + "datapath": "/data/openaddresses", + "files": [ + ] + }, + "polyline": { + "datapath": "/data/polylines", + "files": [ "extract.0sv" ] + }, + "whosonfirst": { + "datapath": "/data/whosonfirst", + "importPostalcodes": true, + "countryCode": "BD", + "importPlace": [ + ] + }, + "interpolation": { + "download": { + } + } + } +} diff --git a/projects/bangladesh/synonyms/custom_name.txt b/projects/bangladesh/synonyms/custom_name.txt new file mode 100644 index 00000000..e69de29b diff --git a/projects/bangladesh/synonyms/custom_street.txt b/projects/bangladesh/synonyms/custom_street.txt new file mode 100644 index 00000000..e69de29b diff --git a/projects/bangladesh/test_cases/libpostal_quirks.json b/projects/bangladesh/test_cases/libpostal_quirks.json new file mode 100644 index 00000000..0db3279e --- /dev/null +++ b/projects/bangladesh/test_cases/libpostal_quirks.json @@ -0,0 +1,3 @@ +{ + +} diff --git a/projects/bangladesh/test_cases/search_address.json b/projects/bangladesh/test_cases/search_address.json new file mode 100644 index 00000000..2c63c085 --- /dev/null +++ b/projects/bangladesh/test_cases/search_address.json @@ -0,0 +1,2 @@ +{ +} diff --git a/projects/bangladesh/test_cases/search_venue.json b/projects/bangladesh/test_cases/search_venue.json new file mode 100644 index 00000000..077404aa --- /dev/null +++ b/projects/bangladesh/test_cases/search_venue.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file