]> git.openstreetmap.org Git - chef.git/blob - cookbooks/blog/recipes/staging.rb
exim: Increase message_linelength_limit to avoid dropping emails
[chef.git] / cookbooks / blog / recipes / staging.rb
1 #
2 # Cookbook:: blog
3 # Recipe:: staging
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 # Workaround to ensure the certificate continues to renew while main code disabled
23 ssl_certificate "staging.blog.openstreetmap.org" do
24   domains ["staging.blog.openstreetmap.org", "staging.blog.osm.org", "staging.blog.openstreetmap.com",
25            "staging.blog.openstreetmap.net", "staging.blog.openstreetmaps.org",
26            "staging.blog.osmfoundation.org"
27           ]
28 end
29
30 passwords = data_bag_item("blog-staging", "passwords")
31 # wp2fa_encrypt_keys = data_bag_item("blog-staging", "wp2fa_encrypt_keys")
32
33 # The staging blog is under manual development by Mikel. Do not manage with Chef.
34
35 # directory "/srv/staging.blog.openstreetmap.org" do
36 #   owner "wordpress"
37 #   group "wordpress"
38 #   mode "755"
39 # end
40
41 # wordpress_site "staging.blog.openstreetmap.org" do
42 #   aliases ["staging.blog.osm.org", "staging.blog.openstreetmap.com",
43 #            "staging.blog.openstreetmap.net", "staging.blog.openstreetmaps.org",
44 #            "staging.blog.osmfoundation.org"
45 #           ]
46 #   directory "/srv/staging.blog.openstreetmap.org/wp"
47 #   database_name "osm-blog-staging"
48 #   database_user "osm-blog-staging-user"
49 #   database_password passwords["osm-blog-staging-user"]
50 #   wp2fa_encrypt_key wp2fa_encrypt_keys["key"]
51 #   urls "/casts" => "/srv/staging.blog.openstreetmap.org/casts",
52 #        "/images" => "/srv/staging.blog.openstreetmap.org/images",
53 #        "/static" => "/srv/staging.blog.openstreetmap.org/static"
54 #   fpm_prometheus_port 11401
55 # end
56
57 # wordpress_theme "staging.blog.openstreetmap.org-osmblog-wp-theme" do
58 #   theme "osmblog-wp-theme"
59 #   site "staging.blog.openstreetmap.org"
60 #   repository "https://github.com/osmfoundation/osmblog-wp-theme.git"
61 # end
62
63 # wordpress_plugin "staging.blog.openstreetmap.org-google-analytics-for-wordpress" do
64 #   action :delete
65 #   plugin "google-analytics-for-wordpress"
66 #   site "staging.blog.openstreetmap.org"
67 # end
68
69 # wordpress_plugin "staging.blog.openstreetmap.org-google-sitemap-generator" do
70 #   action :delete
71 #   plugin "google-sitemap-generator"
72 #   site "staging.blog.openstreetmap.org"
73 # end
74
75 # # wordpress_plugin "blog.openstreetmap.org-www-xml-sitemap-generator-org" do
76 # #   plugin "www-xml-sitemap-generator-org"
77 # #   site "staging.blog.openstreetmap.org"
78 # # end
79
80 # wordpress_plugin "staging.blog.openstreetmap.org-shareadraft" do
81 #   action :delete
82 #   plugin "shareadraft"
83 #   site "staging.blog.openstreetmap.org"
84 # end
85
86 # wordpress_plugin "staging.blog.openstreetmap.org-public-post-preview" do
87 #   plugin "public-post-preview"
88 #   site "staging.blog.openstreetmap.org"
89 # end
90
91 # wordpress_plugin "staging.blog.openstreetmap.org-sitepress-multilingual-cms" do
92 #   plugin "sitepress-multilingual-cms"
93 #   site "staging.blog.openstreetmap.org"
94 #   repository "https://git.openstreetmap.org/private/sitepress-multilingual-cms.git"
95 #   revision "master"
96 #   not_if { kitchen? }
97 # end
98
99 # wordpress_plugin "staging.blog.openstreetmap.org-wordpress-importer" do
100 #   action :delete
101 #   plugin "wordpress-importer"
102 #   site "staging.blog.openstreetmap.org"
103 # end
104
105 # wordpress_plugin "staging.blog.openstreetmap.org-wp-piwik" do
106 #   plugin "wp-piwik"
107 #   site "staging.blog.openstreetmap.org"
108 # end
109
110 # git "/srv/staging.blog.openstreetmap.org/casts" do
111 #   action :sync
112 #   repository "https://github.com/openstreetmap/opengeodata-podcasts.git"
113 #   revision "master"
114 #   depth 1
115 #   user "wordpress"
116 #   group "wordpress"
117 # end
118
119 # git "/srv/staging.blog.openstreetmap.org/images" do
120 #   action :sync
121 #   repository "https://github.com/openstreetmap/opengeodata-images.git"
122 #   revision "master"
123 #   depth 1
124 #   user "wordpress"
125 #   group "wordpress"
126 # end
127
128 # git "/srv/staging.blog.openstreetmap.org/static" do
129 #   action :sync
130 #   repository "https://github.com/openstreetmap/opengeodata-static.git"
131 #   revision "master"
132 #   depth 1
133 #   user "wordpress"
134 #   group "wordpress"
135 # end
136
137 template "/etc/cron.daily/blog-staging-backup" do
138   source "backup-staging.cron.erb"
139   owner "root"
140   group "root"
141   mode "750"
142   variables :passwords => passwords
143 end