aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-12-09 10:44:46 +0000
committerStruan Donald <struan@exo.org.uk>2011-12-09 10:44:46 +0000
commit1a503a4efb805c1f8a6c4f91aa691af02429cb4c (patch)
tree3a36094a1bd30efdd121fd1a5ff08920ea7c4876
parent4d3a847e94a3ad29ec2f876c760251ab3bbb1c1e (diff)
change example config and docs to YAML
-rw-r--r--README.pod26
-rw-r--r--conf/general-example74
-rw-r--r--conf/general-example.yml60
3 files changed, 73 insertions, 87 deletions
diff --git a/README.pod b/README.pod
index 9f0c2dddc..0aa480e13 100644
--- a/README.pod
+++ b/README.pod
@@ -45,7 +45,7 @@ Create a new Apache vhost based on conf/httpd-conf.example
=item *
-Copy conf/general-example to conf/general and update accordingly [FIXME!]
+Copy conf/general-example.yml to conf/general.yml and update accordingly [FIXME!]
=item *
@@ -174,41 +174,41 @@ FastCGI.
=head1 SETTINGS
-The settings for FixMyStreet are in conf/general which is actually a PHP file.
-There are some defaults in conf/general-example which you should copy to
-conf/general.
+The settings for FixMyStreet are defined in conf/general.yml using the YAML
+markup language. There are some defaults in conf/general-example.yml which
+you should copy to conf/general.yml.
The bare minimum of settings you will need to fill in or update are:
=over
-=item OPTION_FMS_DB_PASS
+=item FMS_DB_PASS
This is the password for the database.
-=item OPTION_BASE_URL
+=item BASE_URL
The URL for the homepage of your FixMyStreet install.
-=item OPTION_EMAIL_DOMAIN
+=item EMAIL_DOMAIN
The email domain that emails will be sent from
-=item OPTION_CONTACT_EMAIL
+=item CONTACT_EMAIL
The email address to be used on the site for the contact us form.
-=item OPTION_STAGING_SITE
+=item STAGING_SITE
If this is 1 then all email ( alerts and reports ) will be sent to the
contact email address. Use this for development sites.
-=item OPTION_UPLOAD_CACHE
+=item UPLOAD_CACHE
This is the location where imaged will be stored as they are being uploaded.
It should be accessible by and writeable by the FixMyStreet process.
-=item OPTION_GEO_CACHE
+=item GEO_CACHE
This is the location where Geolocation data will be cached.
It should be accessible by and writeable by the FixMyStreet process.
@@ -216,9 +216,9 @@ It should be accessible by and writeable by the FixMyStreet process.
=back
If you are using Bing or Google maps you should also set one of
-OPTION_BING_MAPS_API_KEY or OPTION_GOOGLE_MAPS_API_KEY.
+BING_MAPS_API_KEY or GOOGLE_MAPS_API_KEY.
-If you are using a MaPit install you should update OPTION_MAPIT_URL.
+If you are using a MaPit install you should update MAPIT_URL.
=head1 COMMON PROBLEMS
diff --git a/conf/general-example b/conf/general-example
deleted file mode 100644
index 83a4c9dd4..000000000
--- a/conf/general-example
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/*
- * general-example:
- * Example values for the "general" config file.
- *
- * Configuration parameters, in PHP syntax. Configuration parameters are set
- * using the PHP define('OPTION_...', '...') function. Both perl and PHP code
- * parse this properly, so you can use comments and conditionals and whatnot,
- * but unless essential it's better to keep it simple....
- *
- * Copy this file to one called "general" in the same directory. Or
- * have multiple config files and use a symlink to change between them.
- *
- * Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
- * Email: francis@mysociety.org; WWW: http://www.mysociety.org
- *
- * $Id: general-example,v 1.23 2010-01-06 14:59:34 louise Exp $
- *
- */
-
-// PostgreSQL database for FMS
-define('OPTION_FMS_DB_HOST', 'localhost');
-define('OPTION_FMS_DB_PORT', '5432');
-define('OPTION_FMS_DB_NAME', 'bci');
-define('OPTION_FMS_DB_USER', 'bci');
-define('OPTION_FMS_DB_PASS', '');
-
-define('OPTION_BASE_URL', 'http://www.example.org');
-
-define('OPTION_EMAIL_DOMAIN', 'example.org');
-define('OPTION_CONTACT_EMAIL', 'team@'.OPTION_EMAIL_DOMAIN);
-define('OPTION_TEST_EMAIL_PREFIX', null);
-
-define('OPTION_CONTACT_NAME', 'FixMyStreet');
-define('OPTION_STAGING_SITE', 1);
-
-define('OPTION_UPLOAD_CACHE', '/upload/');
-define('OPTION_GEO_CACHE', '/cache/');
-define('OPTION_GOOGLE_MAPS_API_KEY', '');
-define('OPTION_BING_MAPS_API_KEY', '');
-
-define('OPTION_LONDON_REPORTIT_URL', '');
-define('OPTION_LONDON_REPORTIT_KEY', '');
-define('OPTION_LONDON_REPORTIT_SECRET', '');
-
-define('OPTION_MAPIT_URL', 'http://mapit.mysociety.org/');
-define('OPTION_MAP_TYPE', 'OSM');
-define('OPTION_EVEL_URL', 'http://services.mysociety.org/evel');
-define('OPTION_GAZE_URL', 'http://gaze.mysociety.org/gaze');
-
-// Tracking
-define('OPTION_TRACKING', 0); // off by default
-define('OPTION_TRACKING_URL', 'http://path/to/web/bug');
-define('OPTION_TRACKING_SECRET', 'really-secret-value');
-
-define('OPTION_AUTH_SHARED_SECRET', '');
-define('OPTION_HEARFROMYOURMP_BASE_URL', '');
-
-define('OPTION_SMTP_SMARTHOST', 'localhost');
-
-define('OPTION_IPHONE_URL', '');
-
-// Log file (used in test harness, and later in admin scripts)
-define('OPTION_HTTPD_ERROR_LOG', '/var/log/apache/error.log');
-
-define('OPTION_ALLOWED_COBRANDS', 'cobrand_one|cobrand_two');
-
-// How many items are returned in the GeoRSS feeds by default
-define('OPTION_RSS_LIMIT', '20');
-
-// Should problem reports link to the council summary pages?
-define('OPTION_AREA_LINKS_FROM_PROBLEMS', '0');
-
-?>
diff --git a/conf/general-example.yml b/conf/general-example.yml
new file mode 100644
index 000000000..efdb5d007
--- /dev/null
+++ b/conf/general-example.yml
@@ -0,0 +1,60 @@
+# general-example.yml:
+# Example values for the "general" config file.
+#
+# Configuration parameters, in YAML syntax.
+#
+# Copy this file to one called "general.yml" in the same directory. Or
+# have multiple config files and use a symlink to change between them.
+
+# PostgreSQL database for FMS
+FMS_DB_HOST: 'localhost'
+FMS_DB_PORT: '5432'
+FMS_DB_NAME: 'fms'
+FMS_DB_USER: 'fms'
+FMS_DB_PASS: ''
+
+BASE_URL: 'http://www.example.org'
+
+EMAIL_DOMAIN: 'example.org'
+CONTACT_EMAIL: 'team@example.org'
+TEST_EMAIL_PREFIX: ''
+
+CONTACT_NAME: 'FixMyStreet'
+STAGING_SITE: 1
+
+UPLOAD_CACHE: '/upload/'
+GEO_CACHE: '/cache/'
+GOOGLE_MAPS_API_KEY: ''
+BING_MAPS_API_KEY: ''
+
+LONDON_REPORTIT_URL: ''
+LONDON_REPORTIT_KEY: ''
+LONDON_REPORTIT_SECRET: ''
+
+MAPIT_URL: 'http://mapit.mysociety.org/'
+MAP_TYPE: 'OSM'
+EVEL_URL: 'http://services.mysociety.org/evel'
+GAZE_URL: 'http://gaze.mysociety.org/gaze'
+
+# Tracking
+TRACKING: 0 # off by default
+TRACKING_URL: 'http://path/to/web/bug'
+TRACKING_SECRET: 'really-secret-value'
+
+AUTH_SHARED_SECRET: ''
+HEARFROMYOURMP_BASE_URL: ''
+
+SMTP_SMARTHOST: 'localhost'
+
+IPHONE_URL: ''
+
+# Log file (used in test harness, and later in admin scripts)
+HTTPD_ERROR_LOG: '/var/log/apache/error.log'
+
+ALLOWED_COBRANDS: 'cobrand_one|cobrand_two'
+
+# How many items are returned in the GeoRSS feeds by default
+RSS_LIMIT: '20'
+
+# Should problem reports link to the council summary pages?
+AREA_LINKS_FROM_PROBLEMS: '0'