5 # Copyright:: 2018, OpenStreetMap Foundation
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
11 # https://www.apache.org/licenses/LICENSE-2.0
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.
20 include_recipe "apache"
21 include_recipe "php::fpm"
24 apache_module "proxy_fcgi"
28 git "/srv/dmca.openstreetmap.org" do
30 repository "https://github.com/openstreetmap/dmca-website.git"
33 notifies :run, "execute[/srv/dmca.openstreetmap.org/composer.json]", :immediately
36 execute "/srv/dmca.openstreetmap.org/composer.json" do
38 command "composer install --no-dev"
39 cwd "/srv/dmca.openstreetmap.org/"
40 environment "COMPOSER_HOME" => "/srv/dmca.openstreetmap.org/"
43 ssl_certificate "dmca.openstreetmap.org" do
44 domains ["dmca.openstreetmap.org", "dmca.osm.org"]
45 notifies :reload, "service[apache2]"
48 php_fpm "dmca.openstreetmap.org" do
49 php_admin_values "open_basedir" => "/srv/dmca.openstreetmap.org/:/usr/share/php/:/tmp/",
50 "disable_functions" => "exec,shell_exec,system,passthru,popen,proc_open"
54 apache_site "dmca.openstreetmap.org" do
56 directory "/srv/dmca.openstreetmap.org"
57 variables :aliases => ["dmca.osm.org"]