Add proper handling of docker stop
This commit is contained in:
parent
ca4b1acb04
commit
6e5f4f485d
@ -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`:
|
||||
|
12
run.sh
12
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
|
||||
|
Loading…
Reference in New Issue
Block a user