]> git.openstreetmap.org Git - chef.git/blob - cookbooks/stateofthemap/recipes/wordpress.rb
Add stateofmap include_recipe for new recipe
[chef.git] / cookbooks / stateofthemap / recipes / wordpress.rb
1 #
2 # Cookbook:: stateofthemap
3 # Recipe:: wordpress
4 #
5 # Copyright:: 2022, OpenStreetMap Foundation
6 #
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
10 #
11 #     https://www.apache.org/licenses/LICENSE-2.0
12 #
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.
18 #
19
20 include_recipe "stateofthemap"
21 include_recipe "wordpress"
22
23 passwords = data_bag_item("stateofthemap", "passwords")
24
25 directory "/srv/2007.stateofthemap.org" do
26   owner "wordpress"
27   group "wordpress"
28   mode "755"
29 end
30
31 wordpress_site "2007.stateofthemap.org" do
32   aliases "2007.stateofthemap.com"
33   directory "/srv/2007.stateofthemap.org/wp"
34   database_name "sotm2007"
35   database_user "sotm2007"
36   database_password passwords["sotm2007"]
37   database_prefix "wp_sotm_"
38   fpm_prometheus_port 12007
39 end
40
41 wordpress_theme "2007.stateofthemap.org-refreshwp-11" do
42   theme "refreshwp-11"
43   site "2007.stateofthemap.org"
44   repository "https://git.openstreetmap.org/public/stateofthemap.git"
45   revision "theme-2007"
46 end
47
48 # wordpress_plugin "2007.stateofthemap.org-geopress" do
49 #   plugin "geopress"
50 #   site "2007.stateofthemap.org"
51 # end
52
53 directory "/srv/2008.stateofthemap.org" do
54   owner "wordpress"
55   group "wordpress"
56   mode "755"
57 end
58
59 wordpress_site "2008.stateofthemap.org" do
60   aliases "2008.stateofthemap.com"
61   directory "/srv/2008.stateofthemap.org/wp"
62   database_name "sotm2008"
63   database_user "sotm2008"
64   database_password passwords["sotm2008"]
65   database_prefix "wp_sotm08_"
66   fpm_prometheus_port 12008
67 end
68
69 wordpress_theme "2008.stateofthemap.org-refreshwp-11" do
70   theme "refreshwp-11"
71   site "2008.stateofthemap.org"
72   repository "https://git.openstreetmap.org/public/stateofthemap.git"
73   revision "theme-2008"
74 end
75
76 # wordpress_plugin "2008.stateofthemap.org-geopress" do
77 #   plugin "geopress"
78 #   site "2008.stateofthemap.org"
79 # end
80
81 directory "/srv/2009.stateofthemap.org" do
82   owner "wordpress"
83   group "wordpress"
84   mode "755"
85 end
86
87 git "/srv/2009.stateofthemap.org" do
88   action :sync
89   repository "https://git.openstreetmap.org/public/stateofthemap.git"
90   revision "resources-2009"
91   depth 1
92   user "wordpress"
93   group "wordpress"
94 end
95
96 wordpress_site "2009.stateofthemap.org" do
97   aliases "2009.stateofthemap.com"
98   directory "/srv/2009.stateofthemap.org/wp"
99   database_name "sotm2009"
100   database_user "sotm2009"
101   database_password passwords["sotm2009"]
102   urls "/register" => "/srv/2009.stateofthemap.org/register",
103        "/register-pro-user" => "/srv/2009.stateofthemap.org/register-pro-user",
104        "/podcasts" => "/srv/2009.stateofthemap.org/podcasts"
105   fpm_prometheus_port 12009
106 end
107
108 wordpress_theme "2009.stateofthemap.org-aerodrome" do
109   theme "aerodrome"
110   site "2009.stateofthemap.org"
111   repository "https://git.openstreetmap.org/public/stateofthemap.git"
112   revision "theme-2009"
113 end
114
115 # wordpress_plugin "2009.stateofthemap.org-wp-sticky" do
116 #   plugin "wp-sticky"
117 #   site "2009.stateofthemap.org"
118 # end
119
120 directory "/srv/2010.stateofthemap.org" do
121   owner "wordpress"
122   group "wordpress"
123   mode "755"
124 end
125
126 git "/srv/2010.stateofthemap.org" do
127   action :sync
128   repository "https://git.openstreetmap.org/public/stateofthemap.git"
129   revision "resources-2010"
130   depth 1
131   user "wordpress"
132   group "wordpress"
133 end
134
135 wordpress_site "2010.stateofthemap.org" do
136   aliases "2010.stateofthemap.com"
137   directory "/srv/2010.stateofthemap.org/wp"
138   database_name "sotm2010"
139   database_user "sotm2010"
140   database_password passwords["sotm2010"]
141   urls "/register" => "/srv/2010.stateofthemap.org/register"
142   fpm_prometheus_port 12010
143 end
144
145 wordpress_theme "2010.stateofthemap.org-aerodrome" do
146   theme "aerodrome"
147   site "2010.stateofthemap.org"
148   repository "https://git.openstreetmap.org/public/stateofthemap.git"
149   revision "theme-2010"
150 end
151
152 wordpress_plugin "2010.stateofthemap.org-sitepress-multilingual-cms" do
153   plugin "sitepress-multilingual-cms"
154   site "2010.stateofthemap.org"
155   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
156   revision "master"
157   not_if { kitchen? }
158 end
159
160 # wordpress_plugin "2010.stateofthemap.org-wp-sticky" do
161 #   plugin "wp-sticky"
162 #   site "2010.stateofthemap.org"
163 # end
164
165 directory "/srv/2011.stateofthemap.org" do
166   owner "wordpress"
167   group "wordpress"
168   mode "755"
169 end
170
171 git "/srv/2011.stateofthemap.org" do
172   action :sync
173   repository "https://git.openstreetmap.org/public/stateofthemap.git"
174   revision "resources-2011"
175   depth 1
176   user "wordpress"
177   group "wordpress"
178 end
179
180 wordpress_site "2011.stateofthemap.org" do
181   aliases "2011.stateofthemap.com"
182   directory "/srv/2011.stateofthemap.org/wp"
183   database_name "sotm2011"
184   database_user "sotm2011"
185   database_password passwords["sotm2011"]
186   urls "/register" => "/srv/2011.stateofthemap.org/register"
187   fpm_prometheus_port 12011
188 end
189
190 wordpress_theme "2011.stateofthemap.org-aerodrome" do
191   theme "aerodrome"
192   site "2011.stateofthemap.org"
193   repository "https://git.openstreetmap.org/public/stateofthemap.git"
194   revision "theme-2011"
195 end
196
197 wordpress_plugin "2011.stateofthemap.org-sitepress-multilingual-cms" do
198   plugin "sitepress-multilingual-cms"
199   site "2011.stateofthemap.org"
200   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
201   revision "master"
202   not_if { kitchen? }
203 end
204
205 # wordpress_plugin "2011.stateofthemap.org-wp-sticky" do
206 #   plugin "wp-sticky"
207 #   site "2011.stateofthemap.org"
208 # end
209
210 directory "/srv/2012.stateofthemap.org" do
211   owner "wordpress"
212   group "wordpress"
213   mode "755"
214 end
215
216 git "/srv/2012.stateofthemap.org" do
217   action :sync
218   repository "https://git.openstreetmap.org/public/stateofthemap.git"
219   revision "resources-2012"
220   depth 1
221   user "wordpress"
222   group "wordpress"
223 end
224
225 wordpress_site "2012.stateofthemap.org" do
226   aliases "2012.stateofthemap.com"
227   directory "/srv/2012.stateofthemap.org/wp"
228   database_name "sotm2012"
229   database_user "sotm2012"
230   database_password passwords["sotm2012"]
231   urls "/register" => "/srv/2012.stateofthemap.org/register"
232   fpm_prometheus_port 12012
233 end
234
235 wordpress_theme "2012.stateofthemap.org-aerodrome" do
236   theme "aerodrome"
237   site "2012.stateofthemap.org"
238   repository "https://git.openstreetmap.org/public/stateofthemap.git"
239   revision "theme-2012"
240 end
241
242 wordpress_plugin "2012.stateofthemap.org-leaflet-maps-marker" do
243   plugin "leaflet-maps-marker"
244   site "2012.stateofthemap.org"
245 end
246
247 wordpress_plugin "2012.stateofthemap.org-sitepress-multilingual-cms" do
248   plugin "sitepress-multilingual-cms"
249   site "2012.stateofthemap.org"
250   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
251   revision "master"
252   not_if { kitchen? }
253 end
254
255 # wordpress_plugin "2012.stateofthemap.org-wp-sticky" do
256 #   plugin "wp-sticky"
257 #   site "2012.stateofthemap.org"
258 # end
259
260 template "/etc/cron.daily/sotm-backup" do
261   source "backup.cron.erb"
262   owner "root"
263   group "root"
264   mode "750"
265   variables :passwords => passwords
266 end