geo-data / openstreetmap-tiles-docker

The OpenStreetMap Tile Server in a Docker container
218 stars 147 forks source link

Update the readme. #20

Open disarticulate opened 8 years ago

disarticulate commented 8 years ago

Usage: docker run [COMMAND ...]

Run OpenStreetMap Tile Server related operations in a docker container.

Positional arguments: The command to run. (default: help)

Commands [COMMAND ]:

help Show this help message initdb Initialise the postgres database startdb Start the postgresql database createuser Create the osm user in the database createdb Create the osm database import Import osm data into the database startservices Start the osm web services cli Drop into a bash shell dropdb Drop the osm database

Set up a database saved on an external volume:

The following command will initialise the postgresql database on an external volume that can be used to persist the data:

 docker run -v /data/osm-postgresql:/var/lib/postgresql homme/openstreetmap-tiles initdb startdb createuser createdb migrate

Import data:

The following will import the .osm file at /tmp/import.osm into the database.

  docker run -v /data/osm-postgresql:/var/lib/postgresql -v /tmp:/data homme/openstreetmap-tiles startdb import

Start the webserver:

Once data is loaded and users have been created run the webserver:

  docker run -P -v /data/osm-postgresql:/var/lib/postgresql homme/openstreetmap-tiles startdb startservices
qupro commented 7 years ago

I am not sure if I doing wrong with commands or I'm having an installation issue. As docker newbie, I think that maybe README should be more step by step tutorial focused.

So I have supposed that it is due to database have to be initializate , data have to be imported, as "Once data is loaded and users have been created run the webserver" says, so I try to do it following the other commands:

I suppose last one is due to "import" command didn't work.

I also try running comand one by one like: docker exec <PID> run initdb then docker exec <PID> run stardb and so on but final outcome it's the same

rodislav commented 7 years ago

what is import.osm ? is this kind of special file, or where can I found more details about it ? I'm trying various files from geofabrik but it's not working

edit: I can user any .pbf file and call them import.pbf and this works, aparently