Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6e5f4f485d | ||
|
ca4b1acb04 | ||
|
40ebaf7934 | ||
|
bfcc7d7c44 | ||
|
598a48145a | ||
|
d106610e05 |
@@ -109,10 +109,11 @@ USER renderer
|
||||
|
||||
# Configure stylesheet
|
||||
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
|
||||
USER root
|
||||
RUN npm install -g carto
|
||||
RUN npm install -g carto@0.18.2
|
||||
USER renderer
|
||||
RUN carto project.mml > mapnik.xml
|
||||
|
||||
|
@@ -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`:
|
||||
|
15
run.sh
15
run.sh
@@ -61,6 +61,9 @@ if [ "$1" = "import" ]; then
|
||||
# Create indexes
|
||||
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
|
||||
|
||||
exit 0
|
||||
@@ -92,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
|
||||
|
Reference in New Issue
Block a user