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", "2007.sotm.org"]
 
  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 # Remove broken geopress plugin
 
  51 wordpress_plugin "2007.stateofthemap.org-geopress" do
 
  54   site "2007.stateofthemap.org"
 
  57 directory "/srv/2008.stateofthemap.org" do
 
  63 wordpress_site "2008.stateofthemap.org" do
 
  64   aliases ["2008.stateofthemap.com", "2008.sotm.org"]
 
  65   directory "/srv/2008.stateofthemap.org/wp"
 
  66   database_name "sotm2008"
 
  67   database_user "sotm2008"
 
  68   database_password passwords["sotm2008"]
 
  69   database_prefix "wp_sotm08_"
 
  70   wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2008"]
 
  71   fpm_prometheus_port 12008
 
  74 wordpress_theme "2008.stateofthemap.org-refreshwp-11" do
 
  76   site "2008.stateofthemap.org"
 
  77   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
  81 # Remove broken geopress plugin
 
  82 wordpress_plugin "2008.stateofthemap.org-geopress" do
 
  85   site "2008.stateofthemap.org"
 
  88 directory "/srv/2009.stateofthemap.org" do
 
  94 git "/srv/2009.stateofthemap.org" do
 
  96   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
  97   revision "resources-2009"
 
 103 wordpress_site "2009.stateofthemap.org" do
 
 104   aliases ["2009.stateofthemap.com", "2009.sotm.org"]
 
 105   directory "/srv/2009.stateofthemap.org/wp"
 
 106   database_name "sotm2009"
 
 107   database_user "sotm2009"
 
 108   database_password passwords["sotm2009"]
 
 109   wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2009"]
 
 110   urls "/register" => "/srv/2009.stateofthemap.org/register",
 
 111        "/register-pro-user" => "/srv/2009.stateofthemap.org/register-pro-user",
 
 112        "/podcasts" => "/srv/2009.stateofthemap.org/podcasts"
 
 113   fpm_prometheus_port 12009
 
 116 wordpress_theme "2009.stateofthemap.org-aerodrome" do
 
 118   site "2009.stateofthemap.org"
 
 119   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
 120   revision "theme-2009"
 
 123 # wordpress_plugin "2009.stateofthemap.org-wp-sticky" do
 
 125 #   site "2009.stateofthemap.org"
 
 128 directory "/srv/2010.stateofthemap.org" do
 
 134 git "/srv/2010.stateofthemap.org" do
 
 136   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
 137   revision "resources-2010"
 
 143 wordpress_site "2010.stateofthemap.org" do
 
 144   aliases ["2010.stateofthemap.com", "2010.sotm.org"]
 
 145   directory "/srv/2010.stateofthemap.org/wp"
 
 146   database_name "sotm2010"
 
 147   database_user "sotm2010"
 
 148   database_password passwords["sotm2010"]
 
 149   wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2010"]
 
 150   urls "/register" => "/srv/2010.stateofthemap.org/register"
 
 151   fpm_prometheus_port 12010
 
 154 wordpress_theme "2010.stateofthemap.org-aerodrome" do
 
 156   site "2010.stateofthemap.org"
 
 157   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
 158   revision "theme-2010"
 
 161 wordpress_plugin "2010.stateofthemap.org-sitepress-multilingual-cms" do
 
 162   plugin "sitepress-multilingual-cms"
 
 163   site "2010.stateofthemap.org"
 
 164   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
 
 169 # wordpress_plugin "2010.stateofthemap.org-wp-sticky" do
 
 171 #   site "2010.stateofthemap.org"
 
 174 directory "/srv/2011.stateofthemap.org" do
 
 180 git "/srv/2011.stateofthemap.org" do
 
 182   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
 183   revision "resources-2011"
 
 189 wordpress_site "2011.stateofthemap.org" do
 
 190   aliases ["2011.stateofthemap.com", "2011.sotm.org"]
 
 191   directory "/srv/2011.stateofthemap.org/wp"
 
 192   database_name "sotm2011"
 
 193   database_user "sotm2011"
 
 194   database_password passwords["sotm2011"]
 
 195   wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2011"]
 
 196   urls "/register" => "/srv/2011.stateofthemap.org/register"
 
 197   fpm_prometheus_port 12011
 
 200 wordpress_theme "2011.stateofthemap.org-aerodrome" do
 
 202   site "2011.stateofthemap.org"
 
 203   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
 204   revision "theme-2011"
 
 207 wordpress_plugin "2011.stateofthemap.org-sitepress-multilingual-cms" do
 
 208   plugin "sitepress-multilingual-cms"
 
 209   site "2011.stateofthemap.org"
 
 210   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
 
 215 # wordpress_plugin "2011.stateofthemap.org-wp-sticky" do
 
 217 #   site "2011.stateofthemap.org"
 
 220 directory "/srv/2012.stateofthemap.org" do
 
 226 git "/srv/2012.stateofthemap.org" do
 
 228   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
 229   revision "resources-2012"
 
 235 wordpress_site "2012.stateofthemap.org" do
 
 236   aliases ["2012.stateofthemap.com", "2012.sotm.org"]
 
 237   directory "/srv/2012.stateofthemap.org/wp"
 
 238   database_name "sotm2012"
 
 239   database_user "sotm2012"
 
 240   database_password passwords["sotm2012"]
 
 241   wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2012"]
 
 242   urls "/register" => "/srv/2012.stateofthemap.org/register"
 
 243   fpm_prometheus_port 12012
 
 246 wordpress_theme "2012.stateofthemap.org-aerodrome" do
 
 248   site "2012.stateofthemap.org"
 
 249   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
 250   revision "theme-2012"
 
 253 wordpress_plugin "2012.stateofthemap.org-leaflet-maps-marker" do
 
 254   plugin "leaflet-maps-marker"
 
 255   site "2012.stateofthemap.org"
 
 258 wordpress_plugin "2012.stateofthemap.org-sitepress-multilingual-cms" do
 
 259   plugin "sitepress-multilingual-cms"
 
 260   site "2012.stateofthemap.org"
 
 261   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
 
 266 # wordpress_plugin "2012.stateofthemap.org-wp-sticky" do
 
 268 #   site "2012.stateofthemap.org"
 
 271 template "/etc/cron.daily/sotm-backup" do
 
 272   source "backup.cron.erb"
 
 276   variables :passwords => passwords