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