]> git.openstreetmap.org Git - chef.git/blob - cookbooks/mediawiki/recipes/default.rb
Drop mod_php support
[chef.git] / cookbooks / mediawiki / recipes / default.rb
1 #
2 # Cookbook:: mediawiki
3 # Recipe:: default
4 #
5 # Copyright:: 2013, OpenStreetMap Foundation
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #     https://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19
20 include_recipe "accounts"
21 include_recipe "apache"
22 include_recipe "apt"
23 include_recipe "git"
24 include_recipe "memcached"
25 include_recipe "mysql"
26 include_recipe "php::apache"
27
28 # Mediawiki Base Requirements
29 package %w[
30   php-cli
31   php-curl
32   php-gd
33   php-intl
34   php-mbstring
35   php-mysql
36   php-xml
37   php-zip
38   composer
39 ]
40
41 # Mediawiki enhanced difference engine
42 package "php-wikidiff2"
43
44 # Mediawiki Image + SVG support
45 package %w[
46   imagemagick
47   librsvg2-bin
48 ]
49
50 # Mediawiki PDF support via Extension:PdfHandler
51 package %w[
52   ghostscript
53   poppler-utils
54 ]
55
56 # Mediawiki backup
57 package %w[
58   xz-utils
59   liblz4-tool
60 ]
61
62 # Mediawiki packages for VisualEditor support
63 package %w[
64   curl
65   parsoid
66 ]
67
68 # Mediawiki packages for SyntaxHighight support
69 package "python-pygments"
70
71 file "/etc/mediawiki/parsoid/settings.js" do
72   action :delete
73 end
74
75 template "/etc/mediawiki/parsoid/config.yaml" do
76   source "parsoid-config.yaml.erb"
77   owner "root"
78   group "root"
79   mode 0o644
80 end
81
82 service "parsoid" do
83   action [:enable]
84   supports :status => false, :restart => true, :reload => false
85   subscribes :restart, "file[/etc/mediawiki/parsoid/settings.js]"
86   subscribes :restart, "template[/etc/mediawiki/parsoid/config.yaml]"
87 end
88
89 link "/etc/php/#{node[:php][:version]}/fpm/conf.d/20-wikidiff2.ini" do
90   to "../../mods-available/wikidiff2.ini"
91 end
92
93 apache_module "rewrite"