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 "git://github.com/ericfischer/gpx-import.git"
52 execute "/srv/gps-tile.openstreetmap.org/import/src/Makefile" do
54 command "make DB=none LDFLAGS=-lm"
55 cwd "/srv/gps-tile.openstreetmap.org/import/src"
58 subscribes :run, "git[/srv/gps-tile.openstreetmap.org/import]"
61 git "/srv/gps-tile.openstreetmap.org/datamaps" do
63 repository "git://github.com/ericfischer/datamaps.git"
69 execute "/srv/gps-tile.openstreetmap.org/datamaps/Makefile" do
72 cwd "/srv/gps-tile.openstreetmap.org/datamaps"
75 subscribes :run, "git[/srv/gps-tile.openstreetmap.org/datamaps]"
78 git "/srv/gps-tile.openstreetmap.org/updater" do
80 repository "git://github.com/ericfischer/gpx-updater.git"
86 systemd_service "gps-update" do
87 description "GPS tile update daemon"
88 after ["network.target", "memcached.service"]
89 wants ["memcached.service"]
91 working_directory "/srv/gps-tile.openstreetmap.org"
92 exec_start "/srv/gps-tile.openstreetmap.org/updater/update"
97 no_new_privileges true
101 service "gps-update" do
102 action [:enable, :start]
103 subscribes :restart, "git[/srv/gps-tile.openstreetmap.org/updater]"
104 subscribes :restart, "systemd_service[gps-update]"
107 remote_directory "/srv/gps-tile.openstreetmap.org/html" do
112 files_owner "gpstile"
113 files_group "gpstile"
117 apache_module "headers"
118 apache_module "rewrite"
120 ssl_certificate "gps-tile.openstreetmap.org" do
121 domains ["gps-tile.openstreetmap.org",
122 "a.gps-tile.openstreetmap.org",
123 "b.gps-tile.openstreetmap.org",
124 "c.gps-tile.openstreetmap.org",
125 "gps.tile.openstreetmap.org",
126 "gps-a.tile.openstreetmap.org",
127 "gps-b.tile.openstreetmap.org",
128 "gps-c.tile.openstreetmap.org"]
129 notifies :reload, "service[apache2]"
132 apache_site "gps-tile.openstreetmap.org" do
133 template "apache.erb"