Skip to content

Commit

Permalink
Use indexes.sql included with openstreetmap-carto instead of own copy (
Browse files Browse the repository at this point in the history
…fixes Overv#204) (Overv#205)
  • Loading branch information
Overv authored Jul 19, 2021
1 parent 85eaca5 commit 7b82bca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 53 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ RUN apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/

# Install python libraries
RUN pip3 install requests \
RUN pip3 install requests \
&& pip3 install pyyaml

# Set up PostGIS
Expand Down Expand Up @@ -132,7 +132,7 @@ RUN mkdir -p /home/renderer/src \
&& cd openstreetmap-carto \
&& rm -rf .git \
&& npm install -g [email protected] \
&& carto project.mml > mapnik.xml
&& carto project.mml > mapnik.xml

# Configure renderd
RUN sed -i 's/renderaccount/renderer/g' /usr/local/etc/renderd.conf \
Expand Down Expand Up @@ -178,7 +178,6 @@ RUN mkdir -p /home/renderer/src \

# Start running
COPY run.sh /
COPY indexes.sql /
ENTRYPOINT ["/run.sh"]
CMD []

Expand Down
48 changes: 0 additions & 48 deletions indexes.sql

This file was deleted.

4 changes: 2 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ if [ "$1" = "import" ]; then
sudo -u renderer osm2pgsql -d gis --create --slim -G --hstore --tag-transform-script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua --number-processes ${THREADS:-4} -S /home/renderer/src/openstreetmap-carto/openstreetmap-carto.style /data.osm.pbf ${OSM2PGSQL_EXTRA_ARGS}

# Create indexes
sudo -u postgres psql -d gis -f indexes.sql
sudo -u postgres psql -d gis -f /home/renderer/src/openstreetmap-carto/indexes.sql

#Import external data
sudo chown -R renderer: /home/renderer/src
sudo -u renderer python3 /home/renderer/src/openstreetmap-carto/scripts/get-external-data.py -c /home/renderer/src/openstreetmap-carto/external-data.yml -D /home/renderer/src/openstreetmap-carto/data
Expand Down

0 comments on commit 7b82bca

Please sign in to comment.