update to debian trixie; postgres 18; fix cron; use tcmalloc
Some checks failed
Build / build (amd64, ubuntu-24.04) (push) Has been cancelled
Build / build (arm64, ubuntu-24.04-arm, v8) (push) Has been cancelled
Build / deploy (push) Has been cancelled
Build / scan (push) Has been cancelled

This commit is contained in:
root
2025-09-08 14:59:47 +02:00
parent bf5a306aaa
commit 792af43640
4 changed files with 17 additions and 11 deletions

12
run.sh
View File

@@ -64,7 +64,7 @@ if [ "$1" == "import" ]; then
sudo -u postgres psql -d gis -c "ALTER TABLE geometry_columns OWNER TO renderer;"
sudo -u postgres psql -d gis -c "ALTER TABLE spatial_ref_sys OWNER TO renderer;"
setPostgresPassword
fi
fi
# Download Luxembourg as sample if no data is provided
if [ ! -f /data/region.osm.pbf ] && [ -z "${DOWNLOAD_PBF:-}" ]; then
@@ -188,24 +188,28 @@ if [ "$1" == "run" ]; then
# Configure renderd threads
sed -i -E "s/num_threads=[0-9]+/num_threads=${THREADS:-4}/g" /etc/renderd.conf
cronPID=0
# start cron job to trigger consecutive updates
if [ "${UPDATES:-}" == "enabled" ] || [ "${UPDATES:-}" == "1" ]; then
printenv > /etc/environment
/etc/init.d/cron start
cron &
cronPID=$!
sudo -u renderer touch /var/log/tiles/run.log; tail -f /var/log/tiles/run.log >> /proc/1/fd/1 &
sudo -u renderer touch /var/log/tiles/osmosis.log; tail -f /var/log/tiles/osmosis.log >> /proc/1/fd/1 &
sudo -u renderer touch /var/log/tiles/expiry.log; tail -f /var/log/tiles/expiry.log >> /proc/1/fd/1 &
sudo -u renderer touch /var/log/tiles/osm2pgsql.log; tail -f /var/log/tiles/osm2pgsql.log >> /proc/1/fd/1 &
fi
# Run while handling docker stop's SIGTERM
stop_handler() {
kill -TERM "$child"
if [ $cronPID -gt 0 ] ; then
kill -TERM "$cronPID"
fi
}
trap stop_handler SIGTERM
sudo -u renderer renderd -f -c /etc/renderd.conf &
sudo LD_PRELOAD=libtcmalloc.so.4 -u renderer renderd -f -c /etc/renderd.conf &
child=$!
wait "$child"