Repository :
http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
---------------------------------------------------------------
commit b7f6dffc5fe2d7c0ca64676d7055702e7f035afb
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Mar 15 08:31:39 2013 +0100
Update documentation
---------------------------------------------------------------
doc/configuration.rst | 7 +++++-
doc/deployment.rst | 57 ++++++++++++++----------------------------------
2 files changed, 23 insertions(+), 41 deletions(-)
diff --git a/doc/configuration.rst b/doc/configuration.rst
index 83e45d0..4208609 100644
--- a/doc/configuration.rst
+++ b/doc/configuration.rst
@@ -1,7 +1,8 @@
Configuration
=============
-There are three main configuration options to set to have fedocal running
+There are the main configuration options to set to have fedocal running.
+These options are all present and described in the fedocal.cfg file.
The secret key
---------------
@@ -34,6 +35,10 @@ Examples URLs are::
DB_URL=sqlite:////full/path/to/database.sqlite
+.. note:: The key ``sqlalchemy.url`` of the ``alembic.ini`` file should
+ have the same value as the ``DB_URL`` described here.
+
+
The admin group
----------------
diff --git a/doc/deployment.rst b/doc/deployment.rst
index 511a5dc..19cf05f 100644
--- a/doc/deployment.rst
+++ b/doc/deployment.rst
@@ -9,17 +9,22 @@ Clone the source::
git clone
http://git.fedorahosted.org/git/fedocal.git
-Copy the configuration file::
+Copy the configuration files::
cp fedocal.cfg.sample fedocal.cfg
+ cp alembic.ini.sample alembic.ini
-Adjust the configuration file (secret key, database URL, admin group...).
+Adjust the configuration files (secret key, database URL, admin group...).
See :doc:`configuration` for detailed information about the configuration.
Create the database scheme::
- python fedocal/fedocallib/model.py
+ sh createdb
+
+or::
+
+ FEDOCAL_CONFIG=/path/to/fedocal.cfg python createdb.py
Set up the WSGI as described below.
@@ -31,13 +36,9 @@ Start by install fedocal::
yum install fedocal
-Find the sample configuration file::
-
- rpm -ql fedocal |grep fedocal.cfg.sample
-
-Copy this file into (for example) ``/etc/`` with the name ``fedocal.cfg``::
-
- cp /path/to/fedocal.cfg.sample /etc/fedocal.cfg
+Adjust the configuration files: ``/etc/fedocal/fedocaf.cfg`` and
+``/etc/fedocal/alembic.ini``.
+See :doc:`configuration` for detailed information about the configuration.
Find the file used to create the database::
@@ -45,7 +46,7 @@ Find the file used to create the database::
Create the database scheme::
- FEDOCAL_CONFIG=/etc/fedocal/cfg python path/to/createdb.py
+ FEDOCAL_CONFIG=/etc/fedocal/fedocal.cfg python path/to/createdb.py
Set up the WSGI as described below.
@@ -60,36 +61,13 @@ Start by installing ``mod_wsgi``::
Then configure apache::
- sudo vim /etc/httd/conf.d/wsgi.conf
-
-and put in this file::
-
- WSGIScriptAlias /fedocal /var/www/wsgi/fedocal.wsgi
- <Directory /var/www/wsgi/>
- Order deny,allow
- Allow from all
- </Directory>
+ sudo vim /etc/httd/conf.d/fedocal.conf
+uncomment the content of the file and adjust as desired.
-Then create the file /var/www/wsgi/fedocal.wsgi with::
- import os
- os.environ['FEDOCAL_CONFIG'] = '/etc/fedocal.cfg'
-
- import fedocal
- application = fedocal.APP
-
-.. note:: If you run form the sources, you might have to add at the
- top of the file ::
-
- import sys
- sys.path.insert(0, '/srv/fedocal/')
-
- Adapt the path to your configuration
-
-
-.. seealso:: Within the sources of fedocal is a ``fedocal.wsgi`` which
- can be used as a template for your own wsgi.
+Then edit the file ``/usr/lib/python2.*/site-packages/fedocal/`` and
+adjust as needed.
Then restart apache and you should be able to access the website on
@@ -120,8 +98,7 @@ Example of the cron job:
::
- */30 * * * * FEDOCAL_CONFIG=/etc/fedocal.cfg python /path/to/fedocal_cron.py
-
+ */30 * * * * FEDOCAL_CONFIG=/etc/fedocal/fedocal.cfg /usr/bin/fedocal_cron.py