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/2009.stateofthemap.org" do
32 git "/srv/2009.stateofthemap.org" do
34 repository "https://git.openstreetmap.org/public/stateofthemap.git"
35 revision "resources-2009"
41 wordpress_site "2009.stateofthemap.org" do
42 aliases ["2009.stateofthemap.com", "2009.sotm.org"]
43 directory "/srv/2009.stateofthemap.org/wp"
44 database_name "sotm2009"
45 database_user "sotm2009"
46 database_password passwords["sotm2009"]
47 wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2009"]
48 urls "/register" => "/srv/2009.stateofthemap.org/register",
49 "/register-pro-user" => "/srv/2009.stateofthemap.org/register-pro-user",
50 "/podcasts" => "/srv/2009.stateofthemap.org/podcasts"
51 fpm_prometheus_port 12009
54 wordpress_theme "2009.stateofthemap.org-aerodrome" do
56 site "2009.stateofthemap.org"
57 repository "https://git.openstreetmap.org/public/stateofthemap.git"
61 # wordpress_plugin "2009.stateofthemap.org-wp-sticky" do
63 # site "2009.stateofthemap.org"
66 directory "/srv/2010.stateofthemap.org" do
72 git "/srv/2010.stateofthemap.org" do
74 repository "https://git.openstreetmap.org/public/stateofthemap.git"
75 revision "resources-2010"
81 wordpress_site "2010.stateofthemap.org" do
82 aliases ["2010.stateofthemap.com", "2010.sotm.org"]
83 directory "/srv/2010.stateofthemap.org/wp"
84 database_name "sotm2010"
85 database_user "sotm2010"
86 database_password passwords["sotm2010"]
87 wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2010"]
88 urls "/register" => "/srv/2010.stateofthemap.org/register"
89 fpm_prometheus_port 12010
92 wordpress_theme "2010.stateofthemap.org-aerodrome" do
94 site "2010.stateofthemap.org"
95 repository "https://git.openstreetmap.org/public/stateofthemap.git"
99 wordpress_plugin "2010.stateofthemap.org-sitepress-multilingual-cms" do
100 plugin "sitepress-multilingual-cms"
101 site "2010.stateofthemap.org"
102 repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
107 # wordpress_plugin "2010.stateofthemap.org-wp-sticky" do
109 # site "2010.stateofthemap.org"
112 directory "/srv/2011.stateofthemap.org" do
118 git "/srv/2011.stateofthemap.org" do
120 repository "https://git.openstreetmap.org/public/stateofthemap.git"
121 revision "resources-2011"
127 wordpress_site "2011.stateofthemap.org" do
128 aliases ["2011.stateofthemap.com", "2011.sotm.org"]
129 directory "/srv/2011.stateofthemap.org/wp"
130 database_name "sotm2011"
131 database_user "sotm2011"
132 database_password passwords["sotm2011"]
133 wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2011"]
134 urls "/register" => "/srv/2011.stateofthemap.org/register"
135 fpm_prometheus_port 12011
138 wordpress_theme "2011.stateofthemap.org-aerodrome" do
140 site "2011.stateofthemap.org"
141 repository "https://git.openstreetmap.org/public/stateofthemap.git"
142 revision "theme-2011"
145 wordpress_plugin "2011.stateofthemap.org-sitepress-multilingual-cms" do
146 plugin "sitepress-multilingual-cms"
147 site "2011.stateofthemap.org"
148 repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
153 # wordpress_plugin "2011.stateofthemap.org-wp-sticky" do
155 # site "2011.stateofthemap.org"
158 directory "/srv/2012.stateofthemap.org" do
164 git "/srv/2012.stateofthemap.org" do
166 repository "https://git.openstreetmap.org/public/stateofthemap.git"
167 revision "resources-2012"
173 wordpress_site "2012.stateofthemap.org" do
174 aliases ["2012.stateofthemap.com", "2012.sotm.org"]
175 directory "/srv/2012.stateofthemap.org/wp"
176 database_name "sotm2012"
177 database_user "sotm2012"
178 database_password passwords["sotm2012"]
179 wp2fa_encrypt_key wp2fa_encrypt_keys["sotm2012"]
180 urls "/register" => "/srv/2012.stateofthemap.org/register"
181 fpm_prometheus_port 12012
184 wordpress_theme "2012.stateofthemap.org-aerodrome" do
186 site "2012.stateofthemap.org"
187 repository "https://git.openstreetmap.org/public/stateofthemap.git"
188 revision "theme-2012"
191 wordpress_plugin "2012.stateofthemap.org-leaflet-maps-marker" do
192 plugin "leaflet-maps-marker"
193 site "2012.stateofthemap.org"
196 wordpress_plugin "2012.stateofthemap.org-sitepress-multilingual-cms" do
197 plugin "sitepress-multilingual-cms"
198 site "2012.stateofthemap.org"
199 repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
204 # wordpress_plugin "2012.stateofthemap.org-wp-sticky" do
206 # site "2012.stateofthemap.org"
209 template "/etc/cron.daily/sotm-backup" do
210 source "backup.cron.erb"
214 variables :passwords => passwords