]> git.openstreetmap.org Git - chef.git/blob - cookbooks/blog/recipes/birthday.rb
web: increase mod_evasive page count to allow iD tiled API requests
[chef.git] / cookbooks / blog / recipes / birthday.rb
1 #
2 # Cookbook:: blog
3 # Recipe:: birthday
4 #
5 # Copyright:: 2024, 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 "wordpress"
21
22 passwords = data_bag_item("birthday20", "passwords")
23 wp2fa_encrypt_keys = data_bag_item("birthday20", "wp2fa_encrypt_keys")
24
25 directory "/srv/birthday20.openstreetmap.org" do
26   owner "wordpress"
27   group "wordpress"
28   mode "755"
29 end
30
31 wordpress_site "birthday20.openstreetmap.org" do
32   aliases ["birthday20.osm.org", "birthday20.openstreetmap.com",
33            "birthday20.openstreetmap.net", "birthday20.openstreetmaps.org"]
34   directory "/srv/birthday20.openstreetmap.org/wp"
35   database_name "osm-birthday20"
36   database_user "osm-birthday20-user"
37   database_password passwords["osm-birthday20-user"]
38   wp2fa_encrypt_key wp2fa_encrypt_keys["key"]
39   fpm_prometheus_port 11403
40 end
41
42 wordpress_plugin "birthday20.openstreetmap.org-shareadraft" do
43   action :delete
44   plugin "shareadraft"
45   site "birthday20.openstreetmap.org"
46 end
47
48 wordpress_plugin "birthday20.openstreetmap.org-public-post-preview" do
49   plugin "public-post-preview"
50   site "birthday20.openstreetmap.org"
51 end
52
53 template "/etc/cron.daily/birthday20-backup" do
54   source "backup-birthday20.cron.erb"
55   owner "root"
56   group "root"
57   mode "750"
58   variables :passwords => passwords
59 end