]> git.openstreetmap.org Git - chef.git/blob - cookbooks/mediawiki/recipes/default.rb
mediawiki: improve Job runner setup
[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::fpm"
27
28 # Mediawiki Base Requirements
29 package %w[
30   php-apcu
31   php-cli
32   php-curl
33   php-gd
34   php-igbinary
35   php-intl
36   php-memcache
37   php-mbstring
38   php-mysql
39   php-xml
40   php-zip
41   composer
42   unzip
43   ffmpeg
44 ]
45
46 # Mediawiki enhanced difference engine
47 package "php-wikidiff2"
48
49 # Mediawiki Image + SVG support
50 package %w[
51   imagemagick
52   librsvg2-bin
53 ]
54
55 # Mediawiki PDF support via Extension:PdfHandler
56 package %w[
57   ghostscript
58   poppler-utils
59 ]
60
61 # Mediawiki backup
62 package %w[
63   xz-utils
64   liblz4-tool
65 ]
66
67 # Mediawiki packages for VisualEditor support
68 package %w[
69   curl
70 ]
71
72 # Mediawiki packages for SyntaxHighight support
73 package "python3-pygments"
74
75 link "/etc/php/#{node[:php][:version]}/fpm/conf.d/20-wikidiff2.ini" do
76   to "../../mods-available/wikidiff2.ini"
77 end
78
79 apache_module "proxy"
80 apache_module "proxy_fcgi"
81 apache_module "rewrite"