GithubHelp home page GithubHelp logo

Comments (5)

missinglink avatar missinglink commented on August 21, 2024

This should be possible, you might have an issue accessing the pbf file in the container.

Please post your pelias.json and docker-compose.yml

from docker.

bmyashaswi avatar bmyashaswi commented on August 21, 2024

Hi,
Here is my pelias.json file
{
"esclient": {
"hosts": [{
"host": "localhost",
"port": 9200
}]
},
"imports": {
"openstreetmap": {
"datapath": "/media/tech/New Volume/Yashaswi/pelias/pelias_bindu_lite_v1.5.pbf",
"leveldbpath": "/media/tech/New Volume/Yashaswi/pelias/data/osm/leveldb",
"adminLookup": true,
"missingFilesAreFatal": false
}
},
"schema": {
"indexName": "pelias"
},
"api": {
"services": {
"placeholder": {
"url": "http://placeholder:4100"
},
"pip": {
"url": "http://pip:4200"
},
"interpolation": {
"url": "http://interpolation:4300"
}
}
}
}

and here is my docker-compose.yml file
version: '2.1'
services:
elasticsearch:
image: pelias/elasticsearch:7.10.2
environment:
- discovery.type=single-node
- cluster.name=pelias
ports:
- "9200:9200"
volumes:
- pelias_elasticsearch:/usr/share/elasticsearch/data
placeholder:
image: pelias/placeholder
environment:
- PELIAS_CONFIG=/code/pelias.json
volumes:
- /media/tech/yashaswi_pelias/pelias.json:/code/pelias.json
pip:
image: pelias/pip
environment:
- PELIAS_CONFIG=/code/pelias.json
volumes:
- /media/tech/yashaswi_pelias/pelias.json:/code/pelias.json
interpolation:
image: pelias/interpolation
environment:
- PELIAS_CONFIG=/code/pelias.json
volumes:
- /media/tech/yashaswi_pelias/pelias.json:/code/pelias.json
api:
image: pelias/api
environment:
- PELIAS_CONFIG=/code/pelias.json
ports:
- "4000:4000"
volumes:
- /media/tech/yashaswi_pelias/pelias.json:/code/pelias.json
schema:
image: pelias/schema
environment:
- PELIAS_CONFIG=/code/pelias.json
volumes:
- /media/tech/yashaswi_pelias/pelias.json:/code/pelias.json
openstreetmap:
image: pelias/openstreetmap
environment:
- PELIAS_CONFIG=/code/pelias.json
volumes:
- /media/tech/yashaswi_pelias/pelias.json:/code/pelias.json
- /media/tech/yashaswi_pelias:/data
command: import
volumes:
pelias_elasticsearch:

can you tell me the folder structure and procedure to run pelias geocoder in docker without external data.

from docker.

missinglink avatar missinglink commented on August 21, 2024

This mapping - /media/tech/yashaswi_pelias:/data says that the directory on the left will be known as the directory on the right within the container.

So you can leave your docker-comose.yml as it is but change the paths in the pelias.json to point to /data eg:

Change this:

"datapath": "/media/tech/New Volume/Yashaswi/pelias/pelias_bindu_lite_v1.5.pbf"
to:

"datapath": "/data/pelias_bindu_lite_v1.5.pbf" and make sure the file is located at /media/tech/yashaswi_pelias/pelias_bindu_lite_v1.5.pbf on your local machine.

from docker.

bmyashaswi avatar bmyashaswi commented on August 21, 2024

I did changes after that I am getting like this error

pelias-api_1 | Elasticsearch WARNING: 2024-07-25T04:38:05Z
pelias-api_1 | Unable to revive connection: http://localhost:9200/
pelias-api_1 |
pelias-api_1 | Elasticsearch WARNING: 2024-07-25T04:38:05Z
pelias-api_1 | No living connections
pelias-api_1 |
pelias-api_1 | 2024-07-25T04:38:05.994Z - error: [api:type_mapping_discovery] message=No Living connections, stack=Error: No Living connections
pelias-api_1 | at sendReqWithConnection (/code/pelias/api/node_modules/elasticsearch/src/lib/transport.js:266:15)
pelias-api_1 | at next (/code/pelias/api/node_modules/elasticsearch/src/lib/connection_pool.js:243:7)
pelias-api_1 | at processTicksAndRejections (node:internal/process/task_queues:78:11)
pelias-api_1 | 2024-07-25T04:38:05.997Z - info: [api] pelias is now running on http://:::3100
pelias-api_1 | 2024-07-25T04:40:12.050Z - info: [api] Pelias API shutting down
pelias-api_1 | 2024-07-25T04:40:23.548Z - warn: [pip] pip service disabled
pelias-api_1 | 2024-07-25T04:40:23.549Z - warn: [placeholder] placeholder service disabled
pelias-api_1 | 2024-07-25T04:40:23.549Z - warn: [language] language service disabled
pelias-api_1 | 2024-07-25T04:40:23.549Z - warn: [interpolation] interpolation service disabled
pelias-api_1 | 2024-07-25T04:40:23.549Z - warn: [libpostal] libpostal service disabled
pelias-api_1 | 2024-07-25T04:40:23.549Z - warn: [libpostal] libpostal service disabled
pelias-api_1 | Elasticsearch ERROR: 2024-07-25T04:40:23Z
pelias-api_1 | Error: Request error, retrying
pelias-api_1 | POST http://localhost:9200/_search?request_cache=true&timeout=10s => connect ECONNREFUSED 127.0.0.1:9200
pelias-api_1 | at Log.error (/code/pelias/api/node_modules/elasticsearch/src/lib/log.js:239:56)
pelias-api_1 | at checkRespForFailure (/code/pelias/api/node_modules/elasticsearch/src/lib/transport.js:298:18)
pelias-api_1 | at HttpConnector. (/code/pelias/api/node_modules/elasticsearch/src/lib/connectors/http.js:171:7)
pelias-api_1 | at ClientRequest.wrapper (/code/pelias/api/node_modules/lodash/lodash.js:4991:19)
pelias-api_1 | at ClientRequest.emit (node:events:513:28)
pelias-api_1 | at Socket.socketErrorListener (node:_http_client:494:9)
pelias-api_1 | at Socket.emit (node:events:513:28)
pelias-api_1 | at emitErrorNT (node:internal/streams/destroy:157:8)
pelias-api_1 | at emitErrorCloseNT (node:internal/streams/destroy:122:3)
pelias-api_1 | at processTicksAndRejections (node:internal/process/task_queues:83:21)
pelias-api_1 |
pelias-api_1 | Elasticsearch WARNING: 2024-07-25T04:40:23Z
pelias-api_1 | Unable to revive connection: http://localhost:9200/
pelias-api_1 |
pelias-api_1 | Elasticsearch WARNING: 2024-07-25T04:40:23Z
pelias-api_1 | No living connections
pelias-api_1 |
pelias-api_1 | 2024-07-25T04:40:23.571Z - error: [api:type_mapping_discovery] message=No Living connections, stack=Error: No Living connections
pelias-api_1 | at sendReqWithConnection (/code/pelias/api/node_modules/elasticsearch/src/lib/transport.js:266:15)
pelias-api_1 | at next (/code/pelias/api/node_modules/elasticsearch/src/lib/connection_pool.js:243:7)
pelias-api_1 | at processTicksAndRejections (node:internal/process/task_queues:78:11)
pelias-api_1 | 2024-07-25T04:40:23.573Z - info: [api] pelias is now running on http://:::3100
root@tech-HP-280-Pro-G6-Microtower-PC:/media/tech/New Volume/Yashaswi/pelias# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
051573476fee pelias/api:latest "./bin/start" 4 minutes ago Up 2 minutes 0.0.0.0:3100->3100/tcp, :::3100->3100/tcp pelias_pelias-api_1
a0a052f18b70 docker.elastic.co/elasticsearch/elasticsearch:7.15.0 "/bin/tini -- /usr/lā€¦" 17 minutes ago Up 17 minutes 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp pelias_elasticsearch_1
root@tech-HP-280-Pro-G6-Microtower-PC:/media/tech/New Volume/Yashaswi/pelias# docker ps ls
"docker ps" accepts no arguments.
See 'docker ps --help'.

Usage: docker ps [OPTIONS]

List containers
root@tech-HP-280-Pro-G6-Microtower-PC:/media/tech/New Volume/Yashaswi/pelias# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
051573476fee pelias/api:latest "./bin/start" 4 minutes ago Up 2 minutes 0.0.0.0:3100->3100/tcp, :::3100->3100/tcp pelias_pelias-api_1
a0a052f18b70 docker.elastic.co/elasticsearch/elasticsearch:7.15.0 "/bin/tini -- /usr/lā€¦" 18 minutes ago Up 18 minutes 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp pelias_elasticsearch_1
root@tech-HP-280-Pro-G6-Microtower-PC:/media/tech/New Volume/Yashaswi/pelias# ^C

from docker.

missinglink avatar missinglink commented on August 21, 2024

This is a huge blob of text, please format your comments so that they are legible.

You've only posted part of the docker-compose.yml file above, please post all of it.

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.