[Tile-serving] [openstreetmap/mod_tile] render_list stucks at Rendering client (#180)
Michał Kiełtyka
notifications at github.com
Wed May 30 10:01:34 UTC 2018
I'm trying to use render_list inside my docker container. However, it freezes on:
```
debug: init_storage_backend: initialising file storage backend at: /var/lib/mod_tile
Rendering client
```
This is my Dockerfile:
```Dockerfile
FROM ubuntu:xenial
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt install -y sudo git osm2pgsql wget curl unzip gdal-bin mapnik-utils node-carto postgresql postgresql-contrib postgis postgresql-9.5-postgis-2.2 autoconf libtool libmapnik-dev apache2-dev
RUN useradd -d /home/ubuntu -ms /bin/bash -g root -G sudo -p osm osm
ARG OSM_PBF_FILE_URL=http://download.openstreetmap.fr/extracts/europe/poland-latest.osm.pbf
RUN su - osm -c "wget -c $OSM_PBF_FILE_URL"
RUN mkdir -p /home/ubuntu/style
COPY style/ /home/ubuntu/style/
COPY ./configure_postgresql.sh ./configure_postgresql.sh
COPY postgresql.conf /etc/postgresql/9.5/main/postgresql.conf
# Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start.
RUN sed -i "s/^exit 101$/exit 0/" /usr/sbin/policy-rc.d
RUN chmod +x ./configure_postgresql.sh
ARG THREADS_NUMBER=16
ARG CACHE_SIZE=3600
RUN ./configure_postgresql.sh $THREADS_NUMBER $CACHE_SIZE
#USER osm
RUN mkdir /home/ubuntu/style/shp
RUN wget http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip -O /home/ubuntu/style/shp/simplified-land-polygons-complete-3857.zip
RUN wget http://data.openstreetmapdata.com/land-polygons-split-3857.zip -O /home/ubuntu/style/shp/land-polygons-split-3857.zip
RUN wget http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.4.0/cultural/10m-populated-places-simple.zip -O /home/ubuntu/style/shp/10m-populated-places-simple.zip
RUN unzip /home/ubuntu/style/shp/simplified-land-polygons-complete-3857.zip -d /home/ubuntu/style/shp
RUN unzip /home/ubuntu/style/shp/land-polygons-split-3857.zip -d /home/ubuntu/style/shp
RUN unzip /home/ubuntu/style/shp/10m-populated-places-simple.zip -d /home/ubuntu/style/shp/10m-populated-places-simple
RUN shapeindex /home/ubuntu/style/shp/land-polygons-split-3857/land_polygons.shp
RUN shapeindex /home/ubuntu/style/shp/simplified-land-polygons-complete-3857/simplified_land_polygons.shp
RUN shapeindex /home/ubuntu/style/shp/10m-populated-places-simple/10m-populated-places-simple.shp
COPY configure.py /home/ubuntu/style/configure.py
RUN chmod +x /home/ubuntu/style/make.py
RUN cd /home/ubuntu/style && ./make.py
RUN carto /home/ubuntu/style/build/project.mml > /home/ubuntu/style/build/style.xml
#USER root
RUN git clone https://github.com/openstreetmap/mod_tile.git
WORKDIR /mod_tile
RUN export LD_LIBRARY_PATH=/usr/lib/apache2/modules
RUN export LD_RUN_PATH=/usr/lib/apache2/modules
RUN ./autogen.sh
RUN ./configure
RUN make
RUN make install
RUN make install-mod_tile
RUN sed -i 's|;socketname=/var/run/renderd/renderd.sock|socketname=/var/run/renderd/renderd.sock|g' /usr/local/etc/renderd.conf
RUN sed -i 's|num_threads=4|num_threads=${THREADS_NUMBER}|g' /usr/local/etc/renderd.conf
RUN sed -i 's|plugins_dir=/usr/lib/mapnik/input|plugins_dir=/usr/lib/mapnik/3.0/input|g' /usr/local/etc/renderd.conf
RUN sed -i 's|XML=.*|XML=/home/ubuntu/style/build/style.xml|g' /usr/local/etc/renderd.conf
RUN sed -i 's|HOST=.*|HOST=localhost|g' /usr/local/etc/renderd.conf
RUN cp debian/renderd.init /etc/init.d/renderd
RUN chmod a+x /etc/init.d/renderd
RUN sed -i 's|DAEMON=.*|DAEMON=/usr/local/bin/$NAME|g' /etc/init.d/renderd
RUN sed -i 's|DAEMON_ARGS=.*|DAEMON_ARGS="-c /usr/local/etc/renderd.conf"|g' /etc/init.d/renderd
RUN sed -i 's|RUNASUSER=.*|RUNASUSER=osm|g' /etc/init.d/renderd
RUN mkdir -p /var/lib/mod_tile
RUN chown -R osm /var/lib/mod_tile
#RUN service postgresql start && export LD_LIBRARY_PATH=/usr/local/lib && export LD_RUN_PATH=/usr/local/lib && /etc/init.d/renderd start && renderd -f -c /usr/local/etc/renderd.conf
ARG MIN_ZOOM=0
ARG MAX_ZOOM=5
RUN service postgresql start \
&& sleep 60 \
&& export LD_LIBRARY_PATH=/usr/local/lib \
&& export LD_RUN_PATH=/usr/local/lib \
&& /etc/init.d/renderd start \
&& render_list -n $THREADS_NUMBER -l 999999999 -m default -a -z $MIN_ZOOM -Z $MAX_ZOOM
RUN apt-get install -y apache2
RUN echo "LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so" >> /etc/apache2/mods-available/mod_tile.load
RUN ln -s /etc/apache2/mods-available/mod_tile.load /etc/apache2/mods-enabled/
COPY 000-default.conf /etc/apache2/sites-enabled/000-default.conf
WORKDIR /var/www/html
RUN wget https://github.com/openlayers/openlayers/releases/download/v4.3.4/v4.3.4.zip
RUN unzip v4.3.4.zip
COPY index.html /var/www/html/index.html
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENV DEBIAN_FRONTEND=newt
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 80
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/issues/180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20180530/500a351f/attachment.html>
More information about the Tile-serving
mailing list