X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/93c098cdc4f22b1fe69ecd88b3ac2d2b211780ff..de36e6558743eebc1185d32fa0b58dbafe9bbc53:/cookbooks/piwik/recipes/default.rb diff --git a/cookbooks/piwik/recipes/default.rb b/cookbooks/piwik/recipes/default.rb index 9064522bf..2bd0b97a5 100644 --- a/cookbooks/piwik/recipes/default.rb +++ b/cookbooks/piwik/recipes/default.rb @@ -1,8 +1,8 @@ # -# Cookbook Name:: piwik +# Cookbook:: piwik # Recipe:: default # -# Copyright 2011, OpenStreetMap Foundation +# Copyright:: 2011, OpenStreetMap Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -33,7 +33,9 @@ package "php-apcu" package "geoipupdate" +apache_module "expires" apache_module "php7.2" +apache_module "rewrite" version = node[:piwik][:version] @@ -56,6 +58,14 @@ execute "unzip-piwik-#{version}" do not_if { File.exist?("/opt/piwik-#{version}/piwik") } end +execute "/opt/piwik-#{version}/piwik/piwik.js" do + command "gzip -k -9 /opt/piwik-#{version}/piwik/piwik.js" + cwd "/opt/piwik-#{version}" + user "root" + group "root" + not_if { File.exist?("/opt/piwik-#{version}/piwik/piwik.js.gz") } +end + directory "/opt/piwik-#{version}/piwik/config" do owner "www-data" group "www-data"