diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-07-03 17:56:54 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-07-03 17:56:54 +0100 |
commit | 3d8d1c2796ec2e0704fb0bebe1ba24bae261c480 (patch) | |
tree | b272576343cf7fa4b95fc6cb74c0d8628cb928ce /docs/installing/manual_install.md | |
parent | 39fd6a5562de76e4d9dfd539c6814567cc0baa16 (diff) | |
parent | dfaafc5e8847260f2e0708314840761e271a7856 (diff) |
Merge branch 'gh-pages' of ssh://git.mysociety.org/data/git/public/alaveteli into gh-pages
Diffstat (limited to 'docs/installing/manual_install.md')
-rw-r--r-- | docs/installing/manual_install.md | 47 |
1 files changed, 13 insertions, 34 deletions
diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md index d3a629155..8d6403b73 100644 --- a/docs/installing/manual_install.md +++ b/docs/installing/manual_install.md @@ -175,20 +175,20 @@ Create a `foi` user from the command line, like this: _Note:_ Leaving the password blank will cause great confusion if you're new to PostgreSQL. -Then create the databases: +We'll create a template for our Alaveteli databases: + + # sudo -u postgres createdb -T template0 -E UTF-8 template_utf8 + # echo "update pg_database set datistemplate=true where datname='template_utf8';" > /tmp/update-template.sql + # sudo -u postgres psql -f /tmp/update-template.sql - # sudo -u postgres createdb -T template0 -E SQL_ASCII -O foi foi_production - # sudo -u postgres createdb -T template0 -E SQL_ASCII -O foi foi_test - # sudo -u postgres createdb -T template0 -E SQL_ASCII -O foi foi_development +Then create the databases: -We create using the ``SQL_ASCII`` encoding, because in postgres this is means -"no encoding"; and because we handle and store all kinds of data that may not -be valid UTF (for example, data originating from various broken email clients -that's not 8-bit clean), it's safer to be able to store *anything*, than reject -data at runtime. + # sudo -u postgres createdb -T template_utf8 -O foi alaveteli_production + # sudo -u postgres createdb -T template_utf8 -O foi alaveteli_test + # sudo -u postgres createdb -T template_utf8 -O foi alaveteli_development -Now you need to set up the database config file to contain the name, username -and password of your postgres database. +Now you need to set up the database config file so that the application can +connect to the postgres database. * Copy `database.yml-example` to `database.yml` in `alaveteli/config` * Edit it to point to your local postgresql database in the development @@ -198,7 +198,8 @@ Example `development` section of `config/database.yml`: development: adapter: postgresql - database: foi_development + template: template_utf8 + database: alaveteli_development username: foi password: secure-password-here host: localhost @@ -338,28 +339,6 @@ localhost interface by adding `--binding=127.0.0.1` The server should have told you the URL to access in your browser to see the site in action. -## Administrator privileges - -The administrative interface is at the URL `/admin`. - -Only users with the `super` admin level can access the admin interface. Users -create their own accounts in the usual way, and then administrators can give -them `super` privileges. - -There is an emergency user account which can be accessed via -`/admin?emergency=1`, using the credentials `ADMIN_USERNAME` and -`ADMIN_PASSWORD`, which are set in `general.yml`. To bootstrap the -first `super` level accounts, you will need to log in as the emergency -user. You can disable the emergency user account by setting `DISABLE_EMERGENCY_USER` to `true` in `general.yml`. - -Users with the superuser role also have extra privileges in the website -frontend, such as being able to categorise any request, being able to view -items that have been hidden from the search, and being presented with "admin" -links next to individual requests and comments in the front end. - -It is possible completely to override the administrator authentication by -setting `SKIP_ADMIN_AUTH` to `true` in `general.yml`. - ## Cron jobs and init scripts `config/crontab-example` contains the cronjobs run on WhatDoTheyKnow. It's in a |