--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<access-policy>
+ <cross-domain-access>
+ <policy>
+ <allow-from http-request-headers="*">
+ <domain uri="*"/>
+ </allow-from>
+ <grant-to>
+ <resource path="/" include-subpaths="true"/>
+ </grant-to>
+ </policy>
+ </cross-domain-access>
+</access-policy>
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
+<cross-domain-policy>
+ <allow-access-from domain="*" />
+</cross-domain-policy>
+
--- /dev/null
+User-agent: *
+Disallow: /
group "gpstile"
end
-execute "import-make" do
+execute "/srv/gps-tile.openstreetmap.org/import/src/Makefile" do
action :nothing
command "make"
cwd "/srv/gps-tile.openstreetmap.org/import/src"
group "gpstile"
end
-execute "datamaps-make" do
+execute "/srv/gps-tile.openstreetmap.org/datamaps/Makefile" do
action :nothing
command "make"
cwd "/srv/gps-tile.openstreetmap.org/datamaps"
group "gpstile"
end
-directory "/srv/gps-tile.openstreetmap.org/html" do
+template "/etc/init.d/gps-update" do
+ source "update.init.erb"
+ owner "root"
+ group "root"
+ mode 0755
+end
+
+#service "gps-update" do
+# action [ :enable, :start ]
+# supports :restart => true
+# subscribes :restart, "git[/srv/gps-tile.openstreetmap.org/updater]"
+#end
+
+remote_directory "/srv/gps-tile.openstreetmap.org/html" do
+ source "html"
owner "gpstile"
group "gpstile"
mode 0755
+ files_owner "gpstile"
+ files_group "gpstile"
+ mode 0644
+end
+
+apache_site "gps-tile.openstreetmap.org" do
+ template "apache.erb"
end
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+
+<VirtualHost *:80>
+ # Basic server configuration
+ ServerName <%= node[:fqdn] %>
+ ServerAlias gps-tile.openstreetmap.org
+ ServerAlias *.gps-tile.openstreetmap.org
+ ServerAdmin webmaster@openstreetmap.org
+
+ # Configure location of static files
+ DocumentRoot /srv/gps-tile.openstreetmap.org/html
+
+ # Configure the CGI script that serves the tiles
+ ScriptAlias /lines /srv/gps-tile.openstreetmap.org/updater/tile
+
+ # Temporary redirect for old CGI location
+ RedirectPermanent /gps-lines/tile /lines
+
+ # Setup logging
+ CustomLog /var/log/apache2/access.log combined
+ ErrorLog /var/log/apache2/error.log
+ BufferedLogs on
+
+ # Always set Access-Control-Allow-Origin so that simple CORS requests
+ # will always work and can be cached
+ Header set Access-Control-Allow-Origin "*"
+</VirtualHost>
+
+<Directory /srv/gps-tile.openstreetmap.org/html>
+ Options None
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+</Directory>
--- /dev/null
+#!/bin/bash
+
+# DO NOT EDIT - This file is being maintained by Chef
+
+start() {
+ start-stop-daemon --start --chuid gpstile --chdir /srv/gps-tile.openstreetmap.org --background --make-pidfile --pidfile /var/run/gps-update.pid --exec /src/gps-tile.openstreetmap.org/updater/update
+}
+
+stop() {
+ start-stop-daemon --stop --retry 300 --pidfile /var/run/gps-update.pid
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop || exit $?
+ start
+ ;;
+esac