openstreetmap-tiles-docker icon indicating copy to clipboard operation
openstreetmap-tiles-docker copied to clipboard

Update the readme.

Open disarticulate opened this issue 8 years ago • 2 comments

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

disarticulate avatar Apr 15 '16 13:04 disarticulate

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.

  • When I run first README command docker run homme/openstreetmap-tiles it finished prompting: For further information run the cli and look at /usr/local/share/doc/README.md. [Mon Dec 19 18:02:33.848170 2016] [tile:warn] [pid 106:tid 139880638855040] Could not determine host name of server to configure tile-json request. Using localhost instead [Mon Dec 19 18:02:33.848207 2016] [tile:notice] [pid 106:tid 139880638855040] Loading tile config default at /osm_tiles/ for zooms 0 - 20 from tile directory /var/lib/mod_tile with extension .png and mime type image/png AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message Although It's running (docker ps shows it's ip on ports 80/tcp, 5432/tcp) It only shows Apache 2 Ubuntu default page at http://172.17.0.2:80 and an "ERR_CONNECTION_REFUSED" at http://172.17.0.2:5432

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:

  • When I run docker run -v /data/osm-postgresql:/var/lib/postgresql homme/openstreetmap-tiles initdb startdb createuser createdb migrate it finished prompting: Initialising postgresql *** /usr/local/sbin/run exited with status 0. *** Shutting down runit daemon (PID 94)... *** Killing all processes...

  • When I run docker run -v /data/osm-postgresql:/var/lib/postgresql -v /tmp:/data homme/openstreetmap-tiles startdb import
    it finished prompting: *** /usr/local/sbin/run exited with status 0. 2016-12-19 17:35:16 UTC LOG: received smart shutdown request 2016-12-19 17:35:16 UTC LOG: shutting down *** Shutting down runit daemon (PID 94)... 2016-12-19 17:35:16 UTC LOG: database system is shut down *** Killing all processes...

  • When I run docker run -P -v /data/osm-postgresql:/var/lib/postgresql homme/openstreetmap-tiles startdb startservices it gives following error several times: An error occurred while loading the map layer 'default': Postgis Plugin: ERROR: relation "planet_osm_polygon" does not exist LINE 3: from planet_osm_polygon

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

qupro avatar Dec 19 '16 18:12 qupro

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

rodislav avatar Apr 25 '17 11:04 rodislav