]> git.openstreetmap.org Git - chef.git/blob - cookbooks/stateofthemap/recipes/default.rb
sotm: Add required apache_module expires
[chef.git] / cookbooks / stateofthemap / recipes / default.rb
1 #
2 # Cookbook:: stateofthemap
3 # Recipe:: default
4 #
5 # Copyright:: 2013, 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 "apache"
21 include_recipe "git"
22
23 apache_module "expires"
24
25 git "/srv/stateofthemap.org" do
26   action :sync
27   repository "https://git.openstreetmap.org/public/stateofthemap.git"
28   revision "chooser"
29   depth 1
30   user "root"
31   group "root"
32 end
33
34 ssl_certificate "stateofthemap.org" do
35   domains ["stateofthemap.org", "www.stateofthemap.org",
36            "stateofthemap.com", "www.stateofthemap.com",
37            "sotm.org", "www.sotm.org"]
38   notifies :reload, "service[apache2]"
39 end
40
41 apache_site "stateofthemap.org" do
42   template "apache.erb"
43   directory "/srv/stateofthemap.org"
44 end