Allow to override host and port
parent
c3d12607c7
commit
756e6cb120
|
@ -31,6 +31,8 @@ To run with postgresql from another docker container:
|
|||
--env PG_ENV_OSM_DB=<database> \
|
||||
--env PG_ENV_OSM_PASSWORD=<password> vitalif/renderd-osm
|
||||
|
||||
Also you may override host and port with PG_ENV_OSM_HOST and PG_ENV_OSM_PORT.
|
||||
|
||||
Once the container is up you should be able to see a small map of the
|
||||
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)
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ sed -i -e "s/{{OSM_BRIGHT_XML_DIR}}/\/usr\/share\/mapnik\/osm-bright-$OSM_BRIGHT
|
|||
# osm-carto setup
|
||||
cd /usr/share/mapnik/openstreetmap-carto-$OSM_CARTO_VERSION/
|
||||
cp project.mml.orig project.mml
|
||||
sed -i "s/\"dbname\": \"gis\"/\"host\": \"$PG_PORT_5432_TCP_ADDR\",\n \
|
||||
\"port\": \"$PG_PORT_5432_TCP_PORT\",\n \
|
||||
sed -i "s/\"dbname\": \"gis\"/\"host\": \"$PG_ENV_OSM_HOST\",\n \
|
||||
\"port\": \"$PG_ENV_OSM_PORT\",\n \
|
||||
\"user\": \"$PG_ENV_OSM_USER\",\n \
|
||||
\"password\": \"$PG_ENV_OSM_PASSWORD\",\n \
|
||||
\"dbname\":\"$PG_ENV_OSM_DB\"/" project.mml
|
||||
|
@ -24,8 +24,8 @@ cd /usr/share/mapnik/osm-bright-$OSM_BRIGHT_VERSION/
|
|||
cp configure.py.sample configure.py
|
||||
# prepare configure.py
|
||||
sed -i -e "s|^config\[\"path\"\].*|config\[\"path\"\] = \"$(pwd)\"|" \
|
||||
-e "s/^config\[\"postgis\"\]\[\"host\"\].*/config\[\"postgis\"\]\[\"host\"\] = \"$PG_PORT_5432_TCP_ADDR\"/" \
|
||||
-e "s/^config\[\"postgis\"\]\[\"port\"\].*/config\[\"postgis\"\]\[\"port\"\] = \"$PG_PORT_5432_TCP_PORT\"/" \
|
||||
-e "s/^config\[\"postgis\"\]\[\"host\"\].*/config\[\"postgis\"\]\[\"host\"\] = \"$PG_ENV_OSM_HOST\"/" \
|
||||
-e "s/^config\[\"postgis\"\]\[\"port\"\].*/config\[\"postgis\"\]\[\"port\"\] = \"$PG_ENV_OSM_PORT\"/" \
|
||||
-e "s/^config\[\"postgis\"\]\[\"dbname\"\].*/config\[\"postgis\"\]\[\"dbname\"\] = \"$PG_ENV_OSM_DB\"/" \
|
||||
-e "s/^config\[\"postgis\"\]\[\"password\"\].*/config\[\"postgis\"\]\[\"password\"\] = \"$PG_ENV_OSM_PASSWORD\"/" \
|
||||
-e "s/^config\[\"postgis\"\]\[\"user\"\].*/config\[\"postgis\"\]\[\"user\"\] = \"$PG_ENV_OSM_USER\"/" configure.py
|
||||
|
|
Loading…
Reference in New Issue