aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/crontab-example26
-rw-r--r--config/database.yml-example10
-rw-r--r--config/database.yml-test1
-rw-r--r--config/general.yml-example2
-rw-r--r--config/httpd.conf-example2
-rw-r--r--config/initializers/alaveteli.rb1
-rw-r--r--config/packages1
-rw-r--r--config/packages.debian-squeeze1
-rw-r--r--config/packages.ubuntu-precise1
-rw-r--r--config/routes.rb4
-rw-r--r--config/varnish-alaveteli.vcl2
11 files changed, 29 insertions, 22 deletions
diff --git a/config/crontab-example b/config/crontab-example
index 8fe13151b..212a4a689 100644
--- a/config/crontab-example
+++ b/config/crontab-example
@@ -5,32 +5,32 @@
# Email: hello@mysociety.org. WWW: http://www.mysociety.org/
PATH=/usr/local/bin:/usr/bin:/bin
-MAILTO=cron-!!(*= $site *)!!@mysociety.org
+MAILTO=!!(*= $mailto *)!!
# Every 5 minutes
-*/5 * * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-xapian-index verbose=true" >> !!(*= $vhost_dir *)!!/logs/update-xapian-index.log || echo "stalled?"
+*/5 * * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-xapian-index verbose=true" >> !!(*= $vhost_dir *)!!/logs/update-xapian-index.log || echo "stalled?"
# Every 10 minutes
5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/foi-alert-tracks check
5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/foi-purge-varnish check
-0,10,20,30,40,50 * * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/send-batch-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/send-batch-requests || echo "stalled?"
+0,10,20,30,40,50 * * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/send-batch-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/send-batch-requests || echo "stalled?"
# Once an hour
-09 * * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-comment-on-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-comment-on-request || echo "stalled?"
+09 * * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-comment-on-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-comment-on-request || echo "stalled?"
# Only root can read the log files
-31 * * * * root run-with-lockfile -n !!(*= $vhost_dir *)!!/load-mail-server-logs.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/load-mail-server-logs || echo "stalled?"
+31 * * * * root !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/load-mail-server-logs.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/load-mail-server-logs || echo "stalled?"
# Once a day, early morning
-23 4 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/delete-old-things.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/delete-old-things || echo "stalled?"
-0 6 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-overdue-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-overdue-requests || echo "stalled?"
-0 7 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-new-response-reminders.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-new-response-reminders || echo "stalled?"
-0 8 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-not-clarified-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-not-clarified-request || echo "stalled?"
-2 4 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/check-recent-requests-sent.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/check-recent-requests-sent || echo "stalled?"
-45 3 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/stop-new-responses-on-old-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/stop-new-responses-on-old-requests || echo "stalled?"
-55 4 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/update-public-body-stats.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-public-body-stats || echo "stalled?"
+23 4 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/delete-old-things.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/delete-old-things || echo "stalled?"
+0 6 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-overdue-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-overdue-requests || echo "stalled?"
+0 7 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-new-response-reminders.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-new-response-reminders || echo "stalled?"
+0 8 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-not-clarified-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-not-clarified-request || echo "stalled?"
+2 4 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/check-recent-requests-sent.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/check-recent-requests-sent || echo "stalled?"
+45 3 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/stop-new-responses-on-old-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/stop-new-responses-on-old-requests || echo "stalled?"
+55 4 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/update-public-body-stats.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-public-body-stats || echo "stalled?"
# Only root can restart apache
-31 1 * * * root run-with-lockfile -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production" || echo "stalled?"
+31 1 * * * root !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production" || echo "stalled?"
# Once a day on all servers
diff --git a/config/database.yml-example b/config/database.yml-example
index e48577f23..126e5a264 100644
--- a/config/database.yml-example
+++ b/config/database.yml-example
@@ -3,7 +3,8 @@
development:
adapter: postgresql
- database: foi_development
+ template: template_utf8
+ database: alaveteli_development
username: <username>
password: <password>
host: localhost
@@ -14,7 +15,8 @@ development:
# Do not set this db to the same as development or production.
test:
adapter: postgresql
- database: foi_test
+ template: template_utf8
+ database: alaveteli_test
username: <username>
password: <password>
host: localhost
@@ -24,9 +26,9 @@ test:
production:
adapter: postgresql
- database: foi_production
+ template: template_utf8
+ database: alaveteli_production
username: <username>
password: <password>
host: localhost
port: 5432
-
diff --git a/config/database.yml-test b/config/database.yml-test
index ff6e2013a..64eafd82d 100644
--- a/config/database.yml-test
+++ b/config/database.yml-test
@@ -1,4 +1,5 @@
test:
adapter: postgresql
+ template: template_utf8
database: foi_test
username: postgres
diff --git a/config/general.yml-example b/config/general.yml-example
index 6e223406e..803c1c6ae 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -26,7 +26,7 @@ ISO_COUNTRY_CODE: GB
TIME_ZONE: Australia/Sydney
# These feeds are displayed accordingly on the Alaveteli "blog" page:
-BLOG_FEED: 'http://www.mysociety.org/category/projects/whatdotheyknow/feed/'
+BLOG_FEED: 'https://www.mysociety.org/category/projects/whatdotheyknow/feed/'
TWITTER_USERNAME: 'whatdotheyknow'
# Set the widget_id to get the Twitter sidebar on the blog page.
# To get one https://twitter.com/settings/widgets
diff --git a/config/httpd.conf-example b/config/httpd.conf-example
index dc2e4966e..8d549d363 100644
--- a/config/httpd.conf-example
+++ b/config/httpd.conf-example
@@ -16,7 +16,7 @@ RewriteEngine On
#RewriteLog /var/log/apache2/rewrite.log
#RewriteLogLevel 9
-# XXX do we need this now we use Passenger?
+# TODO: do we need this now we use Passenger?
# Pass through the HTTP basic authentication to mongrel. See also
# admin_http_auth_user in app/controllers/application.rb
# Note: Apache 2 only. Doesn't work in Apache 1.3, you'll need to live without
diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb
index 6fb6b1420..d9879b5d1 100644
--- a/config/initializers/alaveteli.rb
+++ b/config/initializers/alaveteli.rb
@@ -53,6 +53,7 @@ require 'message_prominence'
require 'theme'
require 'xapian_queries'
require 'date_quarter'
+require 'public_body_csv'
AlaveteliLocalization.set_locales(AlaveteliConfiguration::available_locales,
AlaveteliConfiguration::default_locale)
diff --git a/config/packages b/config/packages
index 9a07c5f20..fda09cbc1 100644
--- a/config/packages
+++ b/config/packages
@@ -39,3 +39,4 @@ sqlite3
libsqlite3-dev
libicu-dev
memcached
+ttf-bitstream-vera
diff --git a/config/packages.debian-squeeze b/config/packages.debian-squeeze
index 6cdf2f9d6..d82d66324 100644
--- a/config/packages.debian-squeeze
+++ b/config/packages.debian-squeeze
@@ -37,3 +37,4 @@ libsqlite3-dev
libicu-dev
postgresql
postgresql-client
+ttf-bitstream-vera
diff --git a/config/packages.ubuntu-precise b/config/packages.ubuntu-precise
index 177d504e2..68911359a 100644
--- a/config/packages.ubuntu-precise
+++ b/config/packages.ubuntu-precise
@@ -33,3 +33,4 @@ libsqlite3-dev
libicu-dev
postgresql
postgresql-client
+ttf-bitstream-vera
diff --git a/config/routes.rb b/config/routes.rb
index d9d21f0bd..7cc85c974 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -16,7 +16,7 @@ Alaveteli::Application.routes.draw do
match '/blog' => 'general#blog', :as => :blog
match '/search' => 'general#search_redirect', :as => :search_redirect
match '/search/all' => 'general#search_redirect', :as => :search_redirect
- # XXX combined is the search query, and then if sorted a "/newest" at the end.
+ # `combined` is the search query, and then if sorted a "/newest" at the end.
# Couldn't find a way to do this in routes which also picked up multiple other slashes
# and dots and other characters that can appear in search query. So we sort it all
# out in the controller.
@@ -130,7 +130,7 @@ Alaveteli::Application.routes.draw do
match '/:feed/list/:view' => 'track#track_list', :as => :track_list, :view => nil, :feed => /(track|feed)/
match '/:feed/body/:url_name' => 'track#track_public_body', :as => :track_public_body, :feed => /(track|feed)/
match '/:feed/user/:url_name' => 'track#track_user', :as => :track_user, :feed => /(track|feed)/
- # XXX :format doesn't work. See hacky code in the controller that makes up for this.
+ # TODO: :format doesn't work. See hacky code in the controller that makes up for this.
match '/:feed/search/:query_array' => 'track#track_search_query',
:as => :track_search,
:feed => /(track|feed)/,
diff --git a/config/varnish-alaveteli.vcl b/config/varnish-alaveteli.vcl
index 5dd0ac83c..d3726682c 100644
--- a/config/varnish-alaveteli.vcl
+++ b/config/varnish-alaveteli.vcl
@@ -92,7 +92,7 @@ sub vcl_recv {
# ban lists, see
# http://kristianlyng.wordpress.com/2010/07/28/smart-bans-with-varnish/
- # XXX in Varnish 2.x, the following would be
+ # TODO: in Varnish 2.x, the following would be
# purge("obj.http.x-url ~ " req.url);
ban("obj.http.x-url ~ " + req.url);
error 200 "Banned";