RENDERD_LISTEN_ADDR
parent
756e6cb120
commit
2f30f8e1e9
|
@ -31,7 +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.
|
||||
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).
|
||||
|
||||
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)
|
||||
|
|
16
apache2/run
16
apache2/run
|
@ -1,3 +1,19 @@
|
|||
#!/bin/bash
|
||||
source /etc/apache2/envvars
|
||||
cat >/etc/apache2/ports.conf <<EOF
|
||||
Listen ${RENDERD_LISTEN_ADDR:-*:80}
|
||||
EOF
|
||||
cat >/etc/apache2/sites-enabled/000-default.conf <<EOF
|
||||
<VirtualHost ${RENDERD_LISTEN_ADDR:-*:80}>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/www/html
|
||||
ErrorLog \${APACHE_LOG_DIR}/error.log
|
||||
CustomLog \${APACHE_LOG_DIR}/access.log combined
|
||||
|
||||
LoadTileConfigFile /usr/local/etc/renderd.conf
|
||||
ModTileRenderdSocketName /var/run/renderd/renderd.sock
|
||||
ModTileRequestTimeout 0
|
||||
ModTileMissingRequestTimeout 1800
|
||||
</VirtualHost>
|
||||
EOF
|
||||
exec /usr/sbin/apache2ctl -DFOREGROUND
|
||||
|
|
10
renderd/run
10
renderd/run
|
@ -12,11 +12,11 @@ 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_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
|
||||
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
|
||||
carto project.mml > style.xml
|
||||
|
||||
# osm-bright setup
|
||||
|
|
Loading…
Reference in New Issue