diff --git a/README.md b/README.md index 0fc5244..52f6cd9 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,8 @@ docker run \ run ``` +**If you do this, then make sure to also run the import with the `openstreetmap-rendered-tiles` volume to make sure that caching works properly across updates!** + ### Enabling automatic updating (optional) Given that you've specified both the OSM data and polygon as specified in the *Automatic updates* section during server setup, you can enable the updating process by setting the variable `UPDATES` to `enabled`: diff --git a/run.sh b/run.sh index 38c2d0c..9522cdd 100755 --- a/run.sh +++ b/run.sh @@ -95,8 +95,16 @@ if [ "$1" = "run" ]; then /etc/init.d/cron start fi - # Run - sudo -u renderer renderd -f -c /usr/local/etc/renderd.conf + # Run while handling docker stop's SIGTERM + stop_handler() { + kill -TERM "$child" + } + trap stop_handler SIGTERM + + sudo -u renderer renderd -f -c /usr/local/etc/renderd.conf & + child=$! + wait "$child" + service postgresql stop exit 0