5 # Copyright:: 2013, 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 "accounts"
21 include_recipe "apache"
23 include_recipe "memcached"
35 libcache-memcached-perl
38 directory "/srv/gps-tile.openstreetmap.org" do
44 git "/srv/gps-tile.openstreetmap.org/import" do
46 repository "https://github.com/e-n-f/gpx-import.git"
53 execute "/srv/gps-tile.openstreetmap.org/import/src/Makefile" do
55 command "make DB=none LDFLAGS=-lm"
56 cwd "/srv/gps-tile.openstreetmap.org/import/src"
59 subscribes :run, "git[/srv/gps-tile.openstreetmap.org/import]"
62 git "/srv/gps-tile.openstreetmap.org/datamaps" do
64 repository "https://github.com/e-n-f/datamaps.git"
71 execute "/srv/gps-tile.openstreetmap.org/datamaps/Makefile" do
74 cwd "/srv/gps-tile.openstreetmap.org/datamaps"
77 subscribes :run, "git[/srv/gps-tile.openstreetmap.org/datamaps]"
80 git "/srv/gps-tile.openstreetmap.org/updater" do
82 repository "https://github.com/openstreetmap/gpx-updater.git"
89 systemd_service "gps-update" do
90 description "GPS tile update daemon"
91 after ["network.target", "memcached.service"]
92 wants ["memcached.service"]
94 working_directory "/srv/gps-tile.openstreetmap.org"
95 exec_start "/srv/gps-tile.openstreetmap.org/updater/update"
97 sandbox :enable_network => true
98 read_write_paths "/srv/gps-tile.openstreetmap.org"
102 service "gps-update" do
103 action [:enable, :start]
104 subscribes :restart, "git[/srv/gps-tile.openstreetmap.org/updater]"
105 subscribes :restart, "systemd_service[gps-update]"
108 remote_directory "/srv/gps-tile.openstreetmap.org/html" do
113 files_owner "gpstile"
114 files_group "gpstile"
118 apache_module "headers"
119 apache_module "rewrite"
121 ssl_certificate "gps-tile.openstreetmap.org" do
122 domains ["gps-tile.openstreetmap.org",
123 "a.gps-tile.openstreetmap.org",
124 "b.gps-tile.openstreetmap.org",
125 "c.gps-tile.openstreetmap.org",
126 "gps.tile.openstreetmap.org",
127 "gps-a.tile.openstreetmap.org",
128 "gps-b.tile.openstreetmap.org",
129 "gps-c.tile.openstreetmap.org"]
130 notifies :reload, "service[apache2]"
133 apache_site "gps-tile.openstreetmap.org" do
134 template "apache.erb"