Code Monkey home page Code Monkey logo

Comments (4)

Istador avatar Istador commented on June 10, 2024 1

The check for /data/region.osm.pbf is explicitely looking for a file and not a directory.

That it fails despite having a correct volume mount command could mean that it created a new empty directory instead, because it couldn't find or access the file:

  • the path /c/cc/data-osm-tileserver/datos/spain-latest.osm.pbf on the host could be wrong and not exist.
  • the docker system isn't configured to be able to volume mount that path (a common issue on Windows, check your docker configuration)

Though I don't think that's the issue, because then it'd have failed downloading and creating the file under the same path as the empty directory.

Because you're using Windows, I'd also suggest to start all absolute paths with two slashes //c/cc/... and //data/region.osm.pbf and //data/database. You might also need to use Windows paths for the host paths instead (e.g. C:\cc\..., C:\\cc\\..., C:/cc/... or similar). Because some 3rd-party terminals try to auto-correct the paths in commands which might lead to invalid paths given to docker. E.g. your file might be mounted, but not at /data/region.osm.pbf but somewhere else in the container.

from openstreetmap-tile-server.

iaguerri avatar iaguerri commented on June 10, 2024

docker run -it -v /c/cc/data-osm-tileserver/datos/spain-latest.osm.pbf:/data/region.osm.pbf -v ./test/data:/data/database overv/openstreetmap-tile-server import

output

+ '[' -z '' ']'
+ echo 'WARNING: No import file at /data/region.osm.pbf, so importing Luxembourg as example...'
WARNING: No import file at /data/region.osm.pbf, so importing Luxembourg as example...
+ DOWNLOAD_PBF=https://download.geofabrik.de/europe/luxembourg-latest.osm.pbf
+ DOWNLOAD_POLY=https://download.geofabrik.de/europe/luxembourg.poly
+ '[' -n https://download.geofabrik.de/europe/luxembourg-latest.osm.pbf ']'
+ echo 'INFO: Download PBF file: https://download.geofabrik.de/europe/luxembourg-latest.osm.pbf'
INFO: Download PBF file: https://download.geofabrik.de/europe/luxembourg-latest.osm.pbf
+ wget https://download.geofabrik.de/europe/luxembourg-latest.osm.pbf -O /data/region.osm.pbf
--2023-10-03 14:15:10--  https://download.geofabrik.de/europe/luxembourg-latest.osm.pbf
Resolving download.geofabrik.de (download.geofabrik.de)... 65.109.50.43, 65.109.48.72
Connecting to download.geofabrik.de (download.geofabrik.de)|65.109.50.43|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 40337746 (38M) [application/octet-stream]
Saving to: ‘/data/region.osm.pbf’

Testing the code above, the Luxembourg file is still downloaded... What I am not doing right?

from openstreetmap-tile-server.

iaguerri avatar iaguerri commented on June 10, 2024

Ok, thanks for the answer! It was the Windows issue.

About the questions related to the external database connection, is there any approach ready yet?

Could it be done like sth as this nominatim does? mediagis/nominatim-docker#245 (comment)
NOMINATIM_DATABASE_DSN="pgsql:dbname=nominatim;hostaddr=192.168.0.3;user=my_user;password=my_pass" \

from openstreetmap-tile-server.

galgof-dy avatar galgof-dy commented on June 10, 2024

@iaguerri were you able to work out some way to connect to a postgres instance running /outside/ of the docker container?

from openstreetmap-tile-server.

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.