Imagery - restart nginx on fragment change
authorGrant Slater <git@firefishy.com>
Sun, 31 Jan 2016 22:39:42 +0000 (22:39 +0000)
committerGrant Slater <git@firefishy.com>
Sun, 31 Jan 2016 22:39:42 +0000 (22:39 +0000)
cookbooks/imagery/resources/layer.rb
cookbooks/imagery/templates/default/nginx_imagery_layer_fragment.conf.erb

index 25bcd7b4bb1a6b2cc7b8b8cec4186fe7be07b3a7..340ed0b6c7876aeeebcedd20e58bf2b6a8e6c56c 100644 (file)
@@ -100,3 +100,7 @@ action :delete do
     action :delete
   end
 end
+
+def after_created
+  notifies :restart, "service[nginx]"
+end
index 18be9f53336793528a8533bc6e16060debd45f21..041870b6a1621a20be0a4cfefcaeef41279c7f8e 100644 (file)
@@ -5,6 +5,7 @@ location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" {
   fastcgi_param QUERY_STRING "map=/srv/imagery/mapserver/layer-<%= @layer %>.map&mode=tile&layers=<%= @layer %>&tilemode=gmap&tile=$2+$3+$1";
   fastcgi_pass "unix:/var/run/mapserver-fastcgi/layer-<%= @layer %>.socket";
   include fastcgi_params;
+
   gzip off;
 }