adapt renderd.conf and add compilation of cyclosm style
This commit is contained in:
parent
6276d18671
commit
c2b79805a0
21
cyclosm/renderd.conf
Normal file
21
cyclosm/renderd.conf
Normal file
@ -0,0 +1,21 @@
|
||||
; BASIC AND SIMPLE CONFIGURATION:
|
||||
|
||||
[renderd]
|
||||
stats_file=/run/renderd/renderd.stats
|
||||
socketname=/run/renderd/renderd.sock
|
||||
num_threads=4
|
||||
tile_dir=/var/cache/renderd/tiles
|
||||
|
||||
[mapnik]
|
||||
plugins_dir=/usr/lib/mapnik/3.1/input
|
||||
font_dir=/usr/share/fonts
|
||||
font_dir_recurse=true
|
||||
|
||||
; ADD YOUR LAYERS:
|
||||
[default]
|
||||
URI=/tile/
|
||||
TILEDIR=/var/cache/renderd/tiles
|
||||
XML=/data/style/mapnik.xml
|
||||
HOST=localhost
|
||||
TILESIZE=256
|
||||
MAXZOOM=20
|
@ -7,6 +7,7 @@ services:
|
||||
#- osm-data:/data/database/
|
||||
- ./database:/data/database/
|
||||
- ./tiles:/data/tiles/
|
||||
- ./cyclosm/renderd.conf:/etc/renderd.conf
|
||||
- ./run.sh:/run.sh # for dev
|
||||
- ./pbf/luxembourg-latest.osm.pbf:/data/region.osm.pbf # change here your pbf
|
||||
- ./pbf/luxembourg.poly:/data/region.poly # and your poly
|
||||
|
8
run.sh
8
run.sh
@ -129,6 +129,12 @@ if [ "$1" == "run" ]; then
|
||||
# Clean /tmp
|
||||
rm -rf /tmp/*
|
||||
|
||||
cd /data/style/
|
||||
git clone --single-branch --branch v0.6 https://github.com/cyclosm/cyclosm-cartocss-style.git --depth 1
|
||||
# carto build
|
||||
carto cyclosm-cartocss-style/project.mml > mapnik.xml
|
||||
|
||||
|
||||
# migrate old files
|
||||
if [ -f /data/database/PG_VERSION ] && ! [ -d /data/database/postgres/ ]; then
|
||||
mkdir /data/database/postgres/
|
||||
@ -164,7 +170,7 @@ if [ "$1" == "run" ]; then
|
||||
setPostgresPassword
|
||||
|
||||
# Configure renderd threads
|
||||
sed -i -E "s/num_threads=[0-9]+/num_threads=${THREADS:-4}/g" /etc/renderd.conf
|
||||
#sed -i -E "s/num_threads=[0-9]+/num_threads=${THREADS:-4}/g" /etc/renderd.conf
|
||||
|
||||
# start cron job to trigger consecutive updates
|
||||
if [ "${UPDATES:-}" == "enabled" ] || [ "${UPDATES:-}" == "1" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user