]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dmca/recipes/default.rb
c0bd959a630852b4dfe1f7a6ef38b74e34dc4dd4
[chef.git] / cookbooks / dmca / recipes / default.rb
1 #
2 # Cookbook:: dmca
3 # Recipe:: default
4 #
5 # Copyright:: 2018, 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 "php::apache"
22
23 directory "/srv/dmca.openstreetmap.org" do
24   owner "root"
25   group "root"
26   mode 0o755
27 end
28
29 remote_directory "/srv/dmca.openstreetmap.org/html" do
30   source "html"
31   owner "root"
32   group "root"
33   mode 0o755
34   files_owner "root"
35   files_group "root"
36   files_mode 0o644
37 end
38
39 ssl_certificate "dmca.openstreetmap.org" do
40   domains ["dmca.openstreetmap.org", "dmca.osm.org"]
41   notifies :reload, "service[apache2]"
42 end
43
44 apache_site "dmca.openstreetmap.org" do
45   template "apache.erb"
46   directory "/srv/dmca.openstreetmap.org"
47   variables :aliases => ["dmca.osm.org"]
48 end