2 # Cookbook:: stateofthemap
5 # Copyright:: 2022, 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 "stateofthemap"
21 include_recipe "wordpress"
23 passwords = data_bag_item("stateofthemap", "passwords")
24 wp2fa_encrypt_keys = data_bag_item("stateofthemap", "wp2fa_encrypt_keys")
26 directory "/srv/2007.stateofthemap.org" do
32 wordpress_site "2007.stateofthemap.org" do
33 aliases "2007.stateofthemap.com"
34 directory "/srv/2007.stateofthemap.org/wp"
35 database_name "sotm2007"
36 database_user "sotm2007"
37 database_password passwords["sotm2007"]
38 database_prefix "wp_sotm_"
39 wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2007"]
40 fpm_prometheus_port 12007
43 wordpress_theme "2007.stateofthemap.org-refreshwp-11" do
45 site "2007.stateofthemap.org"
46 repository "https://git.openstreetmap.org/public/stateofthemap.git"
50 # wordpress_plugin "2007.stateofthemap.org-geopress" do
52 # site "2007.stateofthemap.org"
55 directory "/srv/2008.stateofthemap.org" do
61 wordpress_site "2008.stateofthemap.org" do
62 aliases "2008.stateofthemap.com"
63 directory "/srv/2008.stateofthemap.org/wp"
64 database_name "sotm2008"
65 database_user "sotm2008"
66 database_password passwords["sotm2008"]
67 database_prefix "wp_sotm08_"
68 wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2008"]
69 fpm_prometheus_port 12008
72 wordpress_theme "2008.stateofthemap.org-refreshwp-11" do
74 site "2008.stateofthemap.org"
75 repository "https://git.openstreetmap.org/public/stateofthemap.git"
79 # wordpress_plugin "2008.stateofthemap.org-geopress" do
81 # site "2008.stateofthemap.org"
84 directory "/srv/2009.stateofthemap.org" do
90 git "/srv/2009.stateofthemap.org" do
92 repository "https://git.openstreetmap.org/public/stateofthemap.git"
93 revision "resources-2009"
99 wordpress_site "2009.stateofthemap.org" do
100 aliases "2009.stateofthemap.com"
101 directory "/srv/2009.stateofthemap.org/wp"
102 database_name "sotm2009"
103 database_user "sotm2009"
104 database_password passwords["sotm2009"]
105 wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2009"]
106 urls "/register" => "/srv/2009.stateofthemap.org/register",
107 "/register-pro-user" => "/srv/2009.stateofthemap.org/register-pro-user",
108 "/podcasts" => "/srv/2009.stateofthemap.org/podcasts"
109 fpm_prometheus_port 12009
112 wordpress_theme "2009.stateofthemap.org-aerodrome" do
114 site "2009.stateofthemap.org"
115 repository "https://git.openstreetmap.org/public/stateofthemap.git"
116 revision "theme-2009"
119 # wordpress_plugin "2009.stateofthemap.org-wp-sticky" do
121 # site "2009.stateofthemap.org"
124 directory "/srv/2010.stateofthemap.org" do
130 git "/srv/2010.stateofthemap.org" do
132 repository "https://git.openstreetmap.org/public/stateofthemap.git"
133 revision "resources-2010"
139 wordpress_site "2010.stateofthemap.org" do
140 aliases "2010.stateofthemap.com"
141 directory "/srv/2010.stateofthemap.org/wp"
142 database_name "sotm2010"
143 database_user "sotm2010"
144 database_password passwords["sotm2010"]
145 wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2010"]
146 urls "/register" => "/srv/2010.stateofthemap.org/register"
147 fpm_prometheus_port 12010
150 wordpress_theme "2010.stateofthemap.org-aerodrome" do
152 site "2010.stateofthemap.org"
153 repository "https://git.openstreetmap.org/public/stateofthemap.git"
154 revision "theme-2010"
157 wordpress_plugin "2010.stateofthemap.org-sitepress-multilingual-cms" do
158 plugin "sitepress-multilingual-cms"
159 site "2010.stateofthemap.org"
160 repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
165 # wordpress_plugin "2010.stateofthemap.org-wp-sticky" do
167 # site "2010.stateofthemap.org"
170 directory "/srv/2011.stateofthemap.org" do
176 git "/srv/2011.stateofthemap.org" do
178 repository "https://git.openstreetmap.org/public/stateofthemap.git"
179 revision "resources-2011"
185 wordpress_site "2011.stateofthemap.org" do
186 aliases "2011.stateofthemap.com"
187 directory "/srv/2011.stateofthemap.org/wp"
188 database_name "sotm2011"
189 database_user "sotm2011"
190 database_password passwords["sotm2011"]
191 wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2011"]
192 urls "/register" => "/srv/2011.stateofthemap.org/register"
193 fpm_prometheus_port 12011
196 wordpress_theme "2011.stateofthemap.org-aerodrome" do
198 site "2011.stateofthemap.org"
199 repository "https://git.openstreetmap.org/public/stateofthemap.git"
200 revision "theme-2011"
203 wordpress_plugin "2011.stateofthemap.org-sitepress-multilingual-cms" do
204 plugin "sitepress-multilingual-cms"
205 site "2011.stateofthemap.org"
206 repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
211 # wordpress_plugin "2011.stateofthemap.org-wp-sticky" do
213 # site "2011.stateofthemap.org"
216 directory "/srv/2012.stateofthemap.org" do
222 git "/srv/2012.stateofthemap.org" do
224 repository "https://git.openstreetmap.org/public/stateofthemap.git"
225 revision "resources-2012"
231 wordpress_site "2012.stateofthemap.org" do
232 aliases "2012.stateofthemap.com"
233 directory "/srv/2012.stateofthemap.org/wp"
234 database_name "sotm2012"
235 database_user "sotm2012"
236 database_password passwords["sotm2012"]
237 wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2012"]
238 urls "/register" => "/srv/2012.stateofthemap.org/register"
239 fpm_prometheus_port 12012
242 wordpress_theme "2012.stateofthemap.org-aerodrome" do
244 site "2012.stateofthemap.org"
245 repository "https://git.openstreetmap.org/public/stateofthemap.git"
246 revision "theme-2012"
249 wordpress_plugin "2012.stateofthemap.org-leaflet-maps-marker" do
250 plugin "leaflet-maps-marker"
251 site "2012.stateofthemap.org"
254 wordpress_plugin "2012.stateofthemap.org-sitepress-multilingual-cms" do
255 plugin "sitepress-multilingual-cms"
256 site "2012.stateofthemap.org"
257 repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
262 # wordpress_plugin "2012.stateofthemap.org-wp-sticky" do
264 # site "2012.stateofthemap.org"
267 template "/etc/cron.daily/sotm-backup" do
268 source "backup.cron.erb"
272 variables :passwords => passwords