Compare commits

...

4 Commits

Author SHA1 Message Date
Alexander Overvoorde
6e5f4f485d Add proper handling of docker stop 2019-10-12 12:35:16 +02:00
Alexander Overvoorde
ca4b1acb04 Add planet-import-complete file during imports 2019-10-12 12:21:10 +02:00
Alexander Overvoorde
40ebaf7934 Merge pull request #73 from stevo01/master
use tag v4.23.0 from openstreetmap-carto instead to use master
2019-10-04 19:48:38 +02:00
Steffen Volkmann
bfcc7d7c44 use tag v4.23.0 from openstreetmap-carto instead to use master 2019-10-03 18:15:41 +02:00
3 changed files with 17 additions and 3 deletions

View File

@@ -109,7 +109,8 @@ USER renderer
# Configure stylesheet # Configure stylesheet
WORKDIR /home/renderer/src WORKDIR /home/renderer/src
RUN git clone https://github.com/gravitystorm/openstreetmap-carto.git RUN git clone https://github.com/gravitystorm/openstreetmap-carto.git \
&& git -C openstreetmap-carto checkout v4.23.0
WORKDIR /home/renderer/src/openstreetmap-carto WORKDIR /home/renderer/src/openstreetmap-carto
USER root USER root
RUN npm install -g carto@0.18.2 RUN npm install -g carto@0.18.2

View File

@@ -63,6 +63,8 @@ docker run \
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) ### 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`: 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`:

15
run.sh
View File

@@ -61,6 +61,9 @@ if [ "$1" = "import" ]; then
# Create indexes # Create indexes
sudo -u postgres psql -d gis -f indexes.sql sudo -u postgres psql -d gis -f indexes.sql
# Register that data has changed for mod_tile caching purposes
touch /var/lib/mod_tile/planet-import-complete
service postgresql stop service postgresql stop
exit 0 exit 0
@@ -92,8 +95,16 @@ if [ "$1" = "run" ]; then
/etc/init.d/cron start /etc/init.d/cron start
fi fi
# Run # Run while handling docker stop's SIGTERM
sudo -u renderer renderd -f -c /usr/local/etc/renderd.conf 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 service postgresql stop
exit 0 exit 0