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/2010.stateofthemap.org" do
 
  32 git "/srv/2010.stateofthemap.org" do
 
  34   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
  35   revision "resources-2010"
 
  41 wordpress_site "2010.stateofthemap.org" do
 
  42   aliases ["2010.stateofthemap.com", "2010.sotm.org"]
 
  43   directory "/srv/2010.stateofthemap.org/wp"
 
  44   database_name "sotm2010"
 
  45   database_user "sotm2010"
 
  46   database_password passwords["sotm2010"]
 
  47   wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2010"]
 
  48   urls "/register" => "/srv/2010.stateofthemap.org/register"
 
  49   fpm_prometheus_port 12010
 
  52 wordpress_theme "2010.stateofthemap.org-aerodrome" do
 
  54   site "2010.stateofthemap.org"
 
  55   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
  59 wordpress_plugin "2010.stateofthemap.org-sitepress-multilingual-cms" do
 
  60   plugin "sitepress-multilingual-cms"
 
  61   site "2010.stateofthemap.org"
 
  62   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
 
  67 # wordpress_plugin "2010.stateofthemap.org-wp-sticky" do
 
  69 #   site "2010.stateofthemap.org"
 
  72 directory "/srv/2011.stateofthemap.org" do
 
  78 git "/srv/2011.stateofthemap.org" do
 
  80   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
  81   revision "resources-2011"
 
  87 wordpress_site "2011.stateofthemap.org" do
 
  88   aliases ["2011.stateofthemap.com", "2011.sotm.org"]
 
  89   directory "/srv/2011.stateofthemap.org/wp"
 
  90   database_name "sotm2011"
 
  91   database_user "sotm2011"
 
  92   database_password passwords["sotm2011"]
 
  93   wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2011"]
 
  94   urls "/register" => "/srv/2011.stateofthemap.org/register"
 
  95   fpm_prometheus_port 12011
 
  98 wordpress_theme "2011.stateofthemap.org-aerodrome" do
 
 100   site "2011.stateofthemap.org"
 
 101   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
 102   revision "theme-2011"
 
 105 wordpress_plugin "2011.stateofthemap.org-sitepress-multilingual-cms" do
 
 106   plugin "sitepress-multilingual-cms"
 
 107   site "2011.stateofthemap.org"
 
 108   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
 
 113 # wordpress_plugin "2011.stateofthemap.org-wp-sticky" do
 
 115 #   site "2011.stateofthemap.org"
 
 118 directory "/srv/2012.stateofthemap.org" do
 
 124 git "/srv/2012.stateofthemap.org" do
 
 126   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
 127   revision "resources-2012"
 
 133 wordpress_site "2012.stateofthemap.org" do
 
 134   aliases ["2012.stateofthemap.com", "2012.sotm.org"]
 
 135   directory "/srv/2012.stateofthemap.org/wp"
 
 136   database_name "sotm2012"
 
 137   database_user "sotm2012"
 
 138   database_password passwords["sotm2012"]
 
 139   wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2012"]
 
 140   urls "/register" => "/srv/2012.stateofthemap.org/register"
 
 141   fpm_prometheus_port 12012
 
 144 wordpress_theme "2012.stateofthemap.org-aerodrome" do
 
 146   site "2012.stateofthemap.org"
 
 147   repository "https://git.openstreetmap.org/public/stateofthemap.git"
 
 148   revision "theme-2012"
 
 151 wordpress_plugin "2012.stateofthemap.org-leaflet-maps-marker" do
 
 152   plugin "leaflet-maps-marker"
 
 153   site "2012.stateofthemap.org"
 
 156 wordpress_plugin "2012.stateofthemap.org-sitepress-multilingual-cms" do
 
 157   plugin "sitepress-multilingual-cms"
 
 158   site "2012.stateofthemap.org"
 
 159   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
 
 164 # wordpress_plugin "2012.stateofthemap.org-wp-sticky" do
 
 166 #   site "2012.stateofthemap.org"
 
 169 template "/etc/cron.daily/sotm-backup" do
 
 170   source "backup.cron.erb"
 
 174   variables :passwords => passwords