2014-11-16 23:26:37 +03:00
|
|
|
# docker-renderd-osm
|
|
|
|
|
2018-03-29 02:45:06 +03:00
|
|
|
A basic image for rendering/serving tiles using OpenStreetMap data from an external PostgreSQL instance.
|
2014-11-16 23:26:37 +03:00
|
|
|
|
2018-04-05 23:33:53 +03:00
|
|
|
|
2014-11-16 23:26:37 +03:00
|
|
|
## Build instructions
|
|
|
|
|
|
|
|
Build using
|
|
|
|
|
2018-03-29 02:45:06 +03:00
|
|
|
docker build -t vitalif/renderd-osm github.com/vitalif/docker-renderd-osm.git
|
2014-11-16 23:26:37 +03:00
|
|
|
|
|
|
|
## Running
|
|
|
|
|
2018-03-29 02:45:06 +03:00
|
|
|
This container is designed to work with an PostgreSQL instance
|
|
|
|
with PostGIS and osm2pgsql loaded database (for example,
|
|
|
|
[openfirmware/docker-postgres-osm](https://registry.hub.docker.com/u/openfirmware/postgres-osm/) +
|
|
|
|
[openfirmware/docker-osm2pgsql](https://registry.hub.docker.com/u/openfirmware/osm2pgsql/)).
|
2014-11-16 23:26:37 +03:00
|
|
|
|
2018-03-29 02:45:06 +03:00
|
|
|
To run this container with local PostgreSQL (not docker-packaged):
|
2014-11-16 23:26:37 +03:00
|
|
|
|
2018-03-29 02:45:06 +03:00
|
|
|
docker run --name renderd -it -d -p 8096:80 \
|
|
|
|
-v /var/run/postgresql:/var/run/postgresql \
|
|
|
|
--env PG_ENV_OSM_USER=<user> \
|
|
|
|
--env PG_ENV_OSM_DB=<database> \
|
2018-09-26 09:22:09 +03:00
|
|
|
--env PG_ENV_OSM_HOST=<db_host> \
|
2018-03-29 02:45:06 +03:00
|
|
|
--env PG_ENV_OSM_PASSWORD=<password> vitalif/renderd-osm
|
2014-11-16 23:26:37 +03:00
|
|
|
|
2018-03-29 02:45:06 +03:00
|
|
|
To run with postgresql from another docker container:
|
2014-11-16 23:26:37 +03:00
|
|
|
|
2018-03-29 02:45:06 +03:00
|
|
|
docker run --name renderd -it -d -p 8096:80 \
|
|
|
|
--link postgres-osm:pg \
|
|
|
|
--env PG_ENV_OSM_USER=<user> \
|
|
|
|
--env PG_ENV_OSM_DB=<database> \
|
2018-09-26 09:22:09 +03:00
|
|
|
--env PG_ENV_OSM_HOST=<db_host> \
|
2018-03-29 02:45:06 +03:00
|
|
|
--env PG_ENV_OSM_PASSWORD=<password> vitalif/renderd-osm
|
2014-11-16 23:26:37 +03:00
|
|
|
|
2018-03-30 14:08:00 +03:00
|
|
|
Also you may override host and port with PG_ENV_OSM_HOST and PG_ENV_OSM_PORT,
|
|
|
|
and listen address/port with RENDERD_LISTEN_ADDR (default is 0.0.0.0:80).
|
2018-03-29 12:11:50 +03:00
|
|
|
|
2014-11-16 23:26:37 +03:00
|
|
|
Once the container is up you should be able to see a small map of the
|
2018-03-29 02:45:06 +03:00
|
|
|
world once you point your browser to [http://127.0.0.1:8096/osm/0/0/0.png](http://127.0.0.1:8096/osm/0/0/0.png)
|
2014-11-23 04:31:34 +03:00
|
|
|
|
2018-04-05 23:33:53 +03:00
|
|
|
## Loading and updating OSM data
|
|
|
|
|
|
|
|
Use osm-loader.pl (Russia by now).
|
|
|
|
|
2014-11-23 04:31:34 +03:00
|
|
|
## Available Styles
|
|
|
|
|
|
|
|
* [openstreetmap-carto](https://github.com/gravitystorm/openstreetmap-carto),
|
|
|
|
available at [http://host/osm/0/0/0.png](http://host/osm/0/0/0.png)
|
|
|
|
* [osm-bright](https://github.com/mapbox/osm-bright)
|
|
|
|
available at [http://host/osmb/0/0/0.png](http://host/osmb/0/0/0.png)
|
2014-11-16 23:26:37 +03:00
|
|
|
|
|
|
|
## About
|
|
|
|
|
|
|
|
This Dockerfile has been put together using the [Debian Tileserver Install Guide](https://wiki.debian.org/OSM/tileserver/jessie)
|