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"
101 no_new_privileges true
105 service "gps-update" do
106 action [:enable, :start]
107 subscribes :restart, "git[/srv/gps-tile.openstreetmap.org/updater]"
108 subscribes :restart, "systemd_service[gps-update]"
111 remote_directory "/srv/gps-tile.openstreetmap.org/html" do
116 files_owner "gpstile"
117 files_group "gpstile"
121 apache_module "headers"
122 apache_module "rewrite"
124 ssl_certificate "gps-tile.openstreetmap.org" do
125 domains ["gps-tile.openstreetmap.org",
126 "a.gps-tile.openstreetmap.org",
127 "b.gps-tile.openstreetmap.org",
128 "c.gps-tile.openstreetmap.org",
129 "gps.tile.openstreetmap.org",
130 "gps-a.tile.openstreetmap.org",
131 "gps-b.tile.openstreetmap.org",
132 "gps-c.tile.openstreetmap.org"]
133 notifies :reload, "service[apache2]"
136 apache_site "gps-tile.openstreetmap.org" do
137 template "apache.erb"