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 "wordpress"
22 passwords = data_bag_item("blog", "passwords")
23 wp2fa_encrypt_keys = data_bag_item("blog", "wp2fa_encrypt_keys")
25 directory "/srv/blog.openstreetmap.org" do
31 wordpress_site "blog.openstreetmap.org" do
32 aliases ["blog.osm.org", "blog.openstreetmap.com",
33 "blog.openstreetmap.net", "blog.openstreetmaps.org",
34 "blog.osmfoundation.org"]
35 directory "/srv/blog.openstreetmap.org/wp"
36 database_name "osm-blog"
37 database_user "osm-blog-user"
38 database_password passwords["osm-blog-user"]
39 wp2fa_encrypt_key wp2fa_encrypt_keys["key"]
40 urls "/casts" => "/srv/blog.openstreetmap.org/casts",
41 "/images" => "/srv/blog.openstreetmap.org/images",
42 "/static" => "/srv/blog.openstreetmap.org/static"
43 fpm_prometheus_port 11401
46 wordpress_theme "blog.openstreetmap.org-osmblog-wp-theme" do
47 theme "osmblog-wp-theme"
48 site "blog.openstreetmap.org"
49 repository "https://github.com/osmfoundation/osmblog-wp-theme.git"
52 wordpress_plugin "blog.openstreetmap.org-google-analytics-for-wordpress" do
54 plugin "google-analytics-for-wordpress"
55 site "blog.openstreetmap.org"
58 wordpress_plugin "blog.openstreetmap.org-google-sitemap-generator" do
60 plugin "google-sitemap-generator"
61 site "blog.openstreetmap.org"
64 # wordpress_plugin "blog.openstreetmap.org-www-xml-sitemap-generator-org" do
65 # plugin "www-xml-sitemap-generator-org"
66 # site "blog.openstreetmap.org"
69 wordpress_plugin "blog.openstreetmap.org-shareadraft" do
72 site "blog.openstreetmap.org"
75 wordpress_plugin "blog.openstreetmap.org-public-post-preview" do
76 plugin "public-post-preview"
77 site "blog.openstreetmap.org"
80 wordpress_plugin "blog.openstreetmap.org-sitepress-multilingual-cms" do
81 plugin "sitepress-multilingual-cms"
82 site "blog.openstreetmap.org"
83 repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
88 wordpress_plugin "blog.openstreetmap.org-wordpress-importer" do
90 plugin "wordpress-importer"
91 site "blog.openstreetmap.org"
94 wordpress_plugin "blog.openstreetmap.org-wp-piwik" do
96 site "blog.openstreetmap.org"
99 git "/srv/blog.openstreetmap.org/casts" do
101 repository "https://github.com/openstreetmap/opengeodata-podcasts.git"
108 git "/srv/blog.openstreetmap.org/images" do
110 repository "https://github.com/openstreetmap/opengeodata-images.git"
117 git "/srv/blog.openstreetmap.org/static" do
119 repository "https://github.com/openstreetmap/opengeodata-static.git"
126 ssl_certificate "opengeodata.org" do
127 domains ["opengeodata.org", "www.opengeodata.org", "old.opengeodata.org"]
128 notifies :reload, "service[apache2]"
131 apache_site "opengeodata.org" do
132 template "opengeodata.erb"
133 directory "/srv/opengeodata.org"
136 template "/etc/cron.daily/blog-backup" do
137 source "backup.cron.erb"
141 variables :passwords => passwords