aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/.gitignore2
-rwxr-xr-xconf/Vagrantfile.example82
-rw-r--r--conf/apache-vhost.conf.example14
-rw-r--r--conf/crontab-example (renamed from conf/crontab.example)0
-rw-r--r--conf/crontab.ugly48
-rw-r--r--conf/general.yml-example48
-rw-r--r--conf/httpd.conf-example2
-rw-r--r--conf/nginx.conf.example2
l---------conf/packages2
-rw-r--r--conf/packages.debian-wheezy15
10 files changed, 154 insertions, 61 deletions
diff --git a/conf/.gitignore b/conf/.gitignore
index f0c34fd29..8fa665744 100644
--- a/conf/.gitignore
+++ b/conf/.gitignore
@@ -2,3 +2,5 @@
/general.yml.deployed
/httpd.conf
/httpd.conf.deployed
+/crontab
+/crontab.deployed
diff --git a/conf/Vagrantfile.example b/conf/Vagrantfile.example
new file mode 100755
index 000000000..98b77dcc4
--- /dev/null
+++ b/conf/Vagrantfile.example
@@ -0,0 +1,82 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+BOX_NAME = ENV['BOX_NAME'] || "precise64"
+BOX_URI = ENV['BOX_URI'] || "http://files.vagrantup.com/precise64.box"
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+ # All Vagrant configuration is done here. The most common configuration
+ # options are documented and commented below. For a complete reference,
+ # please see the online documentation at vagrantup.com.
+
+ # Every Vagrant virtual environment requires a box to build off of.
+ config.vm.box = BOX_NAME
+
+ # The url from where the 'config.vm.box' box will be fetched if it
+ # doesn't already exist on the user's system.
+ config.vm.box_url = BOX_URI
+
+ # Create a forwarded port mapping which allows access to a specific port
+ # within the machine from a port on the host machine. In the example below,
+ # accessing "localhost:8080" will access port 80 on the guest machine.
+ config.vm.network :forwarded_port, guest: 3000, host: 3000
+
+ config.vm.provider "virtualbox" do |v|
+ v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"]
+ end
+
+ config.vm.provision :shell, :inline => <<-EOS
+ # To prevent "dpkg-preconfigure: unable to re-open stdin: No such file or directory" warnings
+ export DEBIAN_FRONTEND=noninteractive
+ # To be in the shared directory where the repository might already be
+ cd /vagrant/
+ # We need curl to fetch the install script
+ apt-get update -qq
+ apt-get install -qq -y curl >/dev/null
+ curl -s -O https://raw.github.com/mysociety/commonlib/master/bin/install-site.sh
+ sh install-site.sh --dev fixmystreet vagrant 127.0.0.1.xip.io
+ # All done
+ echo "****************"
+ echo "You can now ssh into your vagrant box: vagrant ssh"
+ echo "The website code is found in: ~/fixmystreet"
+ echo "You can run the dev server with: bin/cron-wrapper script/fixmystreet_app_server.pl [-d] [-r] [--fork]"
+ EOS
+
+ # Create a private network, which allows host-only access to the machine
+ # using a specific IP.
+ # config.vm.network :private_network, ip: "192.168.33.10"
+
+ # Create a public network, which generally matched to bridged network.
+ # Bridged networks make the machine appear as another physical device on
+ # your network.
+ # config.vm.network :public_network
+
+ # If true, then any SSH connections made will enable agent forwarding.
+ # Default value: false
+ # config.ssh.forward_agent = true
+
+ # Share an additional folder to the guest VM. The first argument is
+ # the path on the host to the actual folder. The second argument is
+ # the path on the guest to mount the folder. And the optional third
+ # argument is a set of non-required options.
+ # config.vm.synced_folder "../data", "/vagrant_data"
+
+ # Provider-specific configuration so you can fine-tune various
+ # backing providers for Vagrant. These expose provider-specific options.
+ # Example for VirtualBox:
+ #
+ # config.vm.provider :virtualbox do |vb|
+ # # Don't boot with headless mode
+ # vb.gui = true
+ #
+ # # Use VBoxManage to customize the VM. For example to change memory:
+ # vb.customize ["modifyvm", :id, "--memory", "1024"]
+ # end
+ #
+ # View the documentation for the provider you're using for more
+ # information on available options.
+
+end
diff --git a/conf/apache-vhost.conf.example b/conf/apache-vhost.conf.example
index 97a34fe66..583eb0cde 100644
--- a/conf/apache-vhost.conf.example
+++ b/conf/apache-vhost.conf.example
@@ -1,6 +1,10 @@
# An example Apache virtualhost configuration file.
#
-# See our installation help at http://code.fixmystreet.com/
+# See our installation help at http://fixmystreet.org/
+#
+# Hopefully you can use either mod_fastcgi or mod_fcgid.
+# Ubuntu has mod_fcgid by default, with mod_fastcgi in multiverse.
+# Debian has both.
<VirtualHost *:80>
ServerName fixmystreet.yourservername
@@ -11,9 +15,13 @@
<Directory /home/yourname/fixmystreet/web>
# You also need to enable cgi files to run as CGI scripts. For example:
- # on production servers these are run under fastcgi
Options +ExecCGI
- AddHandler cgi-script .cgi
+
+ AddHandler your-handler .cgi
+ # mod_fastcgi: AddHandler fastcgi-script .cgi
+ # mod_fcgid: AddHandler fcgid-script .cgi
+ # CGI: AddHandler cgi-script .cgi
+
AllowOverride None
</Directory>
diff --git a/conf/crontab.example b/conf/crontab-example
index 47c018573..47c018573 100644
--- a/conf/crontab.example
+++ b/conf/crontab-example
diff --git a/conf/crontab.ugly b/conf/crontab.ugly
deleted file mode 100644
index a88e774d2..000000000
--- a/conf/crontab.ugly
+++ /dev/null
@@ -1,48 +0,0 @@
-# crontab.ugly:
-# Timed tasks for FixMyStreet. Template file.
-#
-# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
-# Email: matthew@mysociety.org. WWW: http://www.mysociety.org/
-#
-# $Id: crontab.ugly,v 1.23 2010-01-07 10:32:24 louise Exp $
-
-PATH=/usr/local/bin:/usr/bin:/bin
-!!(* if ($vhost eq 'www.fixmystreet.com' || $vhost eq 'reportemptyhomes.com') { *)!!
-MAILTO=cron-!!(*= $site *)!!@mysociety.org
-!!(* } else { *)!!
-MAILTO=!!(*= $user *)!!@mysociety.org
-!!(* } *)!!
-
-# On only one server
-!!(* if ($vhost eq 'reportemptyhomes.com') { *)!!
-
-*/5 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports --verbose" || echo "stalled?"
-#2 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-alerts.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-alerts" || echo "stalled?"
-0,30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-questionnaires.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-questionnaires" || echo "stalled?"
-
-!!(* } elsif (($vhost eq 'www.fixmystreet.com') || ($vhost eq 'bromley.test.mysociety.org') || ($vhost eq 'barnet.fixmystreet.staging.mysociety.org') || ($vhost eq 'fixmybarangay.test.mysociety.org') || ($vhost eq 'demo.fixmybarangay.com') || ($vhost eq 'www.fixmybarangay.com') || ($vhost eq 'stevenage.test.mysociety.org')) { *)!!
-5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?"
-0 0-7,9-11,13-15,17-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?"
-0 8,12,16 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports --verbose" || echo "stalled?"
-2 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-alerts.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-alerts" || echo "stalled?"
-0,30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-questionnaires.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-questionnaires" || echo "stalled?"
-5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-comments.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-comments" || echo "stalled?"
-
-5,10,15,20,25,30,35,40,45,50,55 0-7,9-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/fetch-comments.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper fetch-comments" || echo "stalled?"
-10,15,20,25,30,35,40,45,50,55 8 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/fetch-comments.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper fetch-comments" || echo "stalled?"
-5 8 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/fetch-comments.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper fetch-comments --verbose" || echo "stalled?"
-5 1 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/fetch-comments.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper fetch-comments-24hs" || echo "stalled?"
-
-30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/open311-populate-service-list.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper open311-populate-service-list" || echo "stalled?"
-0 0-7,9-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/open311-populate-service-list.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper open311-populate-service-list" || echo "stalled?"
-0 8 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/open311-populate-service-list.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper open311-populate-service-list --warn" || echo "stalled?"
-
-!!(* } *)!!
-
-# Once an hour, update the all reports stats
-13 * * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper update-all-reports
-
-# Once a day on all servers
-39 2 * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/problems-filed-graph
-43 2 * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/problem-creation-graph
-00 8 * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/check-for-zombies !!(*= $user *)!!
diff --git a/conf/general.yml-example b/conf/general.yml-example
index 8d5018362..f5fb89b64 100644
--- a/conf/general.yml-example
+++ b/conf/general.yml-example
@@ -22,9 +22,19 @@ BASE_URL: 'http://www.example.org'
EMAIL_DOMAIN: 'example.org'
CONTACT_EMAIL: 'team@example.org'
CONTACT_NAME: 'FixMyStreet'
+# Address used for emails you don't expect a reply to (e.g. confirmation
+# emails); can be same as CONTACT_EMAIL above, of course, if you don't have a
+# special address.
+DO_NOT_REPLY_EMAIL: 'do-not-reply@example.org'
-# Whether this is a development site or not.
+# Whether this is a development site or not. It will mean e.g. templates/
+# CSS modified times aren't cached
STAGING_SITE: 1
+# Normally, a staging site will route all reports to CONTACT_EMAIL on a
+# development site (when STAGING_SITE is 1), to guard against sending fake
+# reports to live places. Set this to 1 if you want a dev site to route
+# reports as normal.
+SEND_REPORTS_ON_STAGING: 0
# What to use as front page/alert example places placeholder
# Defaults to High Street, Main Street
@@ -62,6 +72,12 @@ GEO_CACHE: '../cache/'
MAPIT_URL: ''
MAPIT_TYPES: [ 'ZZZ' ]
+# If you are using global MapIt, you might want to restrict FixMyStreet usage
+# to only one or more areas, rather than all O04, for example. Provide MapIt
+# IDs here in a list that FixMyStreet should recognise.
+# MAPIT_ID_WHITELIST: [ 240838, 246176, 246733 ]
+MAPIT_ID_WHITELIST: []
+
# If your MapIt has the concept of council wards (subareas of councils, where
# people can sign up for alerts, but not report things), then you can give the
# MapIt type codes for them here.
@@ -69,8 +85,12 @@ MAPIT_TYPES: [ 'ZZZ' ]
# MAPIT_TYPES_CHILDREN: [ 'DIW', 'LBW', 'MTW', 'UTE', 'UTW', 'CED', 'COP', 'LGW' ]
MAPIT_TYPES_CHILDREN: ''
+# Which service to use to look up results from e.g. front page searches.
+# Possible choices are Google, Bing, or OSM (blank will use OSM by default).
+GEOCODER: ''
+
# If you wish to use Google Maps or Bing Maps Geocoding, get and put the
-# relevant key here. Without a key, geocoding will use OSM's Nominatim.
+# relevant key here.
GOOGLE_MAPS_API_KEY: ''
BING_MAPS_API_KEY: ''
@@ -101,15 +121,28 @@ GEOCODING_DISAMBIGUATION: ''
MAP_TYPE: 'OSM'
# FixMyStreet uses a templating cobrand system to provide different looks for
-# different installations. If your site was at moon.example.org, and your templates
-# were in the templates/web/moon directory, you would use:
+# different installations. In the common case, if your templates are in the
+# templates/web/moon directory and CSS in web/cobrands/moon, you just specify:
+# ALLOWED_COBRANDS:
+# - moon
+# If you wish to use multiple cobrands, specify them in a list, optionally with
+# hostname-matching regular expressions if the name of the cobrand is not
+# enough. For example:
# ALLOWED_COBRANDS:
-# - moon: 'moon.example.org'
+# - moon
+# - venus
+# Any hostname with 'moon' in it will use the moon cobrand, any with 'venus'
+# the venus cobrand (any other the Default cobrand). Whereas:
+# ALLOWED_COBRANDS:
+# - moon: 'orbital'
+# - venus
+# Any hostname with 'orbital' in it will use the moon cobrand.
# This also allows development servers to map to different cobrands if needed,
# using DNS subdomains for example.
ALLOWED_COBRANDS:
- - cobrand_one
- - cobrand_two: 'hostname_substring2'
+ - cobrand1
+ - cobrand2: 'hostname_substring2'
+ - cobrand3
# This is only used in "offensive report" emails to provide a link directly to
# the admin interface. If wanted, set to the full URL of your admin interface.
@@ -146,3 +179,4 @@ LONDON_REPORTIT_KEY: ''
LONDON_REPORTIT_SECRET: ''
AUTH_SHARED_SECRET: ''
HEARFROMYOURMP_BASE_URL: ''
+
diff --git a/conf/httpd.conf-example b/conf/httpd.conf-example
index ab17dcec3..d86517333 100644
--- a/conf/httpd.conf-example
+++ b/conf/httpd.conf-example
@@ -4,7 +4,7 @@
# example of such a virtualhost configuration file can be found in the
# file apache-vhost.conf.example in this directory.
#
-# See our installation help at http://code.fixmystreet.com/
+# See our installation help at http://fixmystreet.org/
RewriteEngine on
# RewriteLog /var/log/apache2/rewrite.log
diff --git a/conf/nginx.conf.example b/conf/nginx.conf.example
index 7b26afdbf..dce26e8f9 100644
--- a/conf/nginx.conf.example
+++ b/conf/nginx.conf.example
@@ -3,7 +3,7 @@
# An example sysvinit script to help with this is shown given in the file
# sysvinit-catalyst-fastcgi.example in this directory.
#
-# See our installation help at http://code.fixmystreet.com/
+# See our installation help at http://fixmystreet.org/
server {
diff --git a/conf/packages b/conf/packages
index b5287718b..123595395 120000
--- a/conf/packages
+++ b/conf/packages
@@ -1 +1 @@
-packages.debian-squeeze+testing \ No newline at end of file
+packages.debian-wheezy \ No newline at end of file
diff --git a/conf/packages.debian-wheezy b/conf/packages.debian-wheezy
new file mode 100644
index 000000000..618d3be43
--- /dev/null
+++ b/conf/packages.debian-wheezy
@@ -0,0 +1,15 @@
+make
+jhead
+liberror-perl
+liblocale-gettext-perl
+libsoap-lite-perl
+memcached
+perl
+perlmagick
+libmath-bigint-gmp-perl
+gettext
+ruby-compass
+postgresql-server-dev-9.1 | postgresql-server-dev-8.4
+gnuplot
+ttf-bitstream-vera
+libexpat1-dev