Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6e5f4f485d | ||
|
ca4b1acb04 | ||
|
40ebaf7934 | ||
|
bfcc7d7c44 | ||
|
598a48145a | ||
|
d106610e05 |
@@ -109,10 +109,11 @@ 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
|
RUN npm install -g carto@0.18.2
|
||||||
USER renderer
|
USER renderer
|
||||||
RUN carto project.mml > mapnik.xml
|
RUN carto project.mml > mapnik.xml
|
||||||
|
|
||||||
|
@@ -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
15
run.sh
@@ -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
|
||||||
|
Reference in New Issue
Block a user