From 27c470c3eb3fa7fe0e36e9cfee056067f9c3ad00 Mon Sep 17 00:00:00 2001 From: Felix Delattre Date: Thu, 29 Jul 2021 22:27:47 +0000 Subject: [PATCH] Improved configuration files --- .github/workflows/github-actions.yml | 14 +++++++------- Makefile.am | 2 +- README.rst | 8 ++++---- .../apache2/renderd-example-map.conf | 0 .../renderd.conf.dist => etc/apache2/renderd.conf | 2 -- renderd.conf => etc/renderd/renderd.conf | 2 +- .../renderd/renderd.conf.examples | 0 {examples => utils}/example-map/index.html | 0 {examples => utils}/example-map/mapnik.xml | 0 .../example-map/very_simplified_land_polygons.cpg | 0 .../example-map/very_simplified_land_polygons.dbf | Bin .../example-map/very_simplified_land_polygons.prj | 0 .../example-map/very_simplified_land_polygons.shp | Bin .../example-map/very_simplified_land_polygons.shx | Bin 14 files changed, 13 insertions(+), 15 deletions(-) rename examples/config/apache2/renderd-example-map.conf.dist => etc/apache2/renderd-example-map.conf (100%) rename examples/config/apache2/renderd.conf.dist => etc/apache2/renderd.conf (99%) rename renderd.conf => etc/renderd/renderd.conf (87%) rename examples/config/renderd/renderd.conf.dist => etc/renderd/renderd.conf.examples (100%) rename {examples => utils}/example-map/index.html (100%) rename {examples => utils}/example-map/mapnik.xml (100%) rename {examples => utils}/example-map/very_simplified_land_polygons.cpg (100%) rename {examples => utils}/example-map/very_simplified_land_polygons.dbf (100%) rename {examples => utils}/example-map/very_simplified_land_polygons.prj (100%) rename {examples => utils}/example-map/very_simplified_land_polygons.shp (100%) rename {examples => utils}/example-map/very_simplified_land_polygons.shx (100%) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 83ac9290..0689a72a 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -120,22 +120,22 @@ jobs: - name: Set up Apache HTTP Server run: | sudo mkdir --parents /run/renderd /var/cache/renderd/tiles - mkdir --parents examples/example-map/leaflet + mkdir --parents utils/example-map/leaflet curl --silent "https://unpkg.com/leaflet@1.7.1/dist/leaflet.js" \ - > examples/example-map/leaflet/leaflet.min.js + > utils/example-map/leaflet/leaflet.min.js curl --silent "https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" \ - > examples/example-map/leaflet/leaflet.css + > utils/example-map/leaflet/leaflet.css sudo ln --symbolic \ - "${PWD}/examples/example-map" \ + "${PWD}/utils/example-map" \ /var/www/ sudo ln --symbolic \ - "${PWD}/examples/config/renderd/renderd.conf.dist" \ + "${PWD}/etc/renderd/renderd.conf.examples" \ /etc/renderd.conf sudo ln --symbolic \ - "${PWD}/examples/config/apache2/renderd.conf.dist" \ + "${PWD}/etc/apache2/renderd.conf" \ /etc/apache2/conf-enabled/renderd.conf sudo ln --symbolic \ - "${PWD}/examples/config/apache2/renderd-example-map.conf.dist" \ + "${PWD}/etc/apache2/renderd-example-map.conf" \ /etc/apache2/conf-enabled/renderd-example-map.conf echo "LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so" \ | sudo tee --append /etc/apache2/mods-enabled/mod_tile.load diff --git a/Makefile.am b/Makefile.am index 45a9153f..12f32e36 100644 --- a/Makefile.am +++ b/Makefile.am @@ -48,7 +48,7 @@ renderd_SOURCES = \ $(STORE_SOURCES) renderd_CXXFLAGS = $(MAPNIK_CFLAGS) renderd_LDADD = $(PTHREAD_CFLAGS) $(MAPNIK_LDFLAGS) $(STORE_LDFLAGS) -liniparser -renderd_DATA = renderd.conf +renderd_DATA = etc/renderd/renderd.conf render_speedtest_SOURCES = \ src/speedtest.cpp \ diff --git a/README.rst b/README.rst index d43ad1a2..f7c927f0 100644 --- a/README.rst +++ b/README.rst @@ -90,7 +90,7 @@ Configuration After you either installed the software packages or copiled the software yourself, you can continue with the configuration. For your convenience example configuration files are distributed with the software packages and -located in the ``examples/config`` directory of this repository. +located in the ``etc`` directory of this repository. A very basic example-map and data can be found in the ``example-map`` directory. For a simple test copy it over to ``/var/www/example-map``. @@ -99,9 +99,9 @@ Copy the configuration files to their place, too: :: - $ cp examples/config/renderd.conf.dist /etc/renderd.conf - $ cp examples/config/apache2/renderd.conf.dist /etc/apache2/conf-available/renderd.conf - $ cp examples/config/apache2/renderd-example-map.conf.dist /etc/apache2/conf-available/renderd-example-map.conf + $ cp etc/renderd/renderd.conf /etc/renderd.conf + $ cp etc/apache2/renderd.conf /etc/apache2/conf-available/renderd.conf + $ cp etc/apache2/renderd-example-map.conf /etc/apache2/conf-available/renderd-example-map.conf Enable the configuration: diff --git a/examples/config/apache2/renderd-example-map.conf.dist b/etc/apache2/renderd-example-map.conf similarity index 100% rename from examples/config/apache2/renderd-example-map.conf.dist rename to etc/apache2/renderd-example-map.conf diff --git a/examples/config/apache2/renderd.conf.dist b/etc/apache2/renderd.conf similarity index 99% rename from examples/config/apache2/renderd.conf.dist rename to etc/apache2/renderd.conf index a8087fae..c26d0705 100644 --- a/examples/config/apache2/renderd.conf.dist +++ b/etc/apache2/renderd.conf @@ -1,5 +1,3 @@ -Alias /mod_tile /var/cache/renderd/tiles - Options Indexes FollowSymLinks MultiViews diff --git a/renderd.conf b/etc/renderd/renderd.conf similarity index 87% rename from renderd.conf rename to etc/renderd/renderd.conf index a63aaaa7..7245cc21 100644 --- a/renderd.conf +++ b/etc/renderd/renderd.conf @@ -7,7 +7,7 @@ num_threads=4 tile_dir=/var/cache/renderd/tiles [mapnik] -plugins_dir=/usr/lib/mapnik/3.0/input +plugins_dir=/usr/lib/mapnik/3.1/input font_dir=/usr/share/fonts/truetype font_dir_recurse=true diff --git a/examples/config/renderd/renderd.conf.dist b/etc/renderd/renderd.conf.examples similarity index 100% rename from examples/config/renderd/renderd.conf.dist rename to etc/renderd/renderd.conf.examples diff --git a/examples/example-map/index.html b/utils/example-map/index.html similarity index 100% rename from examples/example-map/index.html rename to utils/example-map/index.html diff --git a/examples/example-map/mapnik.xml b/utils/example-map/mapnik.xml similarity index 100% rename from examples/example-map/mapnik.xml rename to utils/example-map/mapnik.xml diff --git a/examples/example-map/very_simplified_land_polygons.cpg b/utils/example-map/very_simplified_land_polygons.cpg similarity index 100% rename from examples/example-map/very_simplified_land_polygons.cpg rename to utils/example-map/very_simplified_land_polygons.cpg diff --git a/examples/example-map/very_simplified_land_polygons.dbf b/utils/example-map/very_simplified_land_polygons.dbf similarity index 100% rename from examples/example-map/very_simplified_land_polygons.dbf rename to utils/example-map/very_simplified_land_polygons.dbf diff --git a/examples/example-map/very_simplified_land_polygons.prj b/utils/example-map/very_simplified_land_polygons.prj similarity index 100% rename from examples/example-map/very_simplified_land_polygons.prj rename to utils/example-map/very_simplified_land_polygons.prj diff --git a/examples/example-map/very_simplified_land_polygons.shp b/utils/example-map/very_simplified_land_polygons.shp similarity index 100% rename from examples/example-map/very_simplified_land_polygons.shp rename to utils/example-map/very_simplified_land_polygons.shp diff --git a/examples/example-map/very_simplified_land_polygons.shx b/utils/example-map/very_simplified_land_polygons.shx similarity index 100% rename from examples/example-map/very_simplified_land_polygons.shx rename to utils/example-map/very_simplified_land_polygons.shx