2 # Cookbook Name:: wiki.openstreetmap.org
5 # Copyright 2013, OpenStreetMap Foundation
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
11 # https://www.apache.org/licenses/LICENSE-2.0
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.
20 # include_recipe "squid"
22 include_recipe "mediawiki"
24 passwords = data_bag_item("wiki", "passwords")
26 apache_site "default" do
30 mediawiki_site "wiki.openstreetmap.org" do
31 aliases ["wiki.osm.org", "wiki.openstreetmap.com", "wiki.openstreetmap.net",
32 "wiki.openstreetmap.ca", "wiki.openstreetmap.eu",
33 "wiki.openstreetmap.pro", "wiki.openstreetmaps.org"]
34 directory "/srv/wiki.openstreetmap.org"
37 database_user "wiki-user"
38 database_password passwords["database"]
40 admin_password passwords["admin"]
42 logo "/osm_logo_wiki.png"
44 email_contact "webmaster@openstreetmap.org"
45 email_sender "wiki@noreply.openstreetmap.org"
46 email_sender_name "OpenStreetMap Wiki"
48 metanamespace "OpenStreetMap"
50 recaptcha_public_key "6LdFIQATAAAAAMwtHeI8KDgPqvRbXeNYSq1gujKz"
51 recaptcha_private_key passwords["recaptcha"]
53 # site_notice "MAINTENANCE: WIKI READ-ONLY UNTIL Monday 16 May 2016 - 11:00am UTC/GMT."
54 # site_readonly "MAINTENANCE: WIKI READ-ONLY UNTIL Monday 16 May 2016 - 11:00am UTC/GMT."
57 mediawiki_extension "MobileFrontend" do
58 site "wiki.openstreetmap.org"
59 template "mw-ext-MobileFrontend.inc.php.erb"
62 mediawiki_extension "CodeEditor" do
63 site "wiki.openstreetmap.org"
66 mediawiki_extension "Scribunto" do
67 site "wiki.openstreetmap.org"
68 template "mw-ext-Scribunto.inc.php.erb"
69 template_cookbook "wiki"
72 cookbook_file "/srv/wiki.openstreetmap.org/osm_logo_wiki.png" do
73 owner node[:mediawiki][:user]
74 group node[:mediawiki][:group]
78 template "/srv/wiki.openstreetmap.org/robots.txt" do
79 owner node[:mediawiki][:user]
80 group node[:mediawiki][:group]
82 source "robots.txt.erb"
85 cookbook_file "/srv/wiki.openstreetmap.org/favicon.ico" do
86 owner node[:mediawiki][:user]
87 group node[:mediawiki][:group]
91 directory "/srv/dump.wiki.openstreetmap.org" do
92 owner node[:mediawiki][:user]
93 group node[:mediawiki][:group]
97 apache_site "dump.wiki.openstreetmap.org" do
98 template "apache_wiki_dump.erb"
99 directory "/srv/dump.wiki.openstreetmap.org"
100 variables :aliases => "dump.wiki.osm.org"
103 template "/etc/cron.d/wiki-osm-org-dump" do
107 source "cron_wiki_dump.erb"