set limit for search heap,
[wolnelektury.git] / doc / installation.rst
1 =====
2 Setup
3 =====
4
5 Requirements
6 ------------
7
8 * `Python 2.6+ <http://python.org>`_
9 * Everyting from the ``requirements.txt`` file
10 * a library for your database of choice
11   (see `DBs supported by Django <http://docs.djangoproject.com/en/dev/topics/install/#get-your-database-running>`_)
12 * `pyLucene <https://github.com/fnp/pylucene/>`_ for search
13 * Librarian dependencies for generating PDF and MOBI files, 
14   see lib/librarian/README.md
15
16
17 Installation
18 ------------
19 Installing database::
20
21     cd wolnelektury
22     ./manage.py syncdb
23     ./manage.py migrate
24
25
26 Running
27 -------
28
29 You can run the server with::
30
31     ./manage.py runserver
32
33 If you want to run lengthy tasks (like generating e-book files) in a seperate
34 Celery process (this is the default), you'll also need to run:
35
36     ./manage.py celeryd --loglevel=INFO
37
38 If you don't want to run a separate Celery daemon, make sure you set this
39 option in your ``localsettings.py``::
40
41     CELERY_ALWAYS_EAGER = True
42
43
44 Deployment
45 ----------
46 Setup your server in fabfile.py and do::
47
48     fab <your_server_name> setup
49
50 Aside from uploading a current (git's HEAD) version of the app this will also
51 download all dependencies into a `virtualenv <http://www.virtualenv.org>`_, 
52 create a VHost and WSGI files for running with Apache and mod_wsgi, and
53 a celery config file for `supervisord <http://supervisord.org/>`_.
54
55 To deploy a new version into an existing setup, do:
56
57     fab <your_server_name> deploy
58
59 This will also check for new dependencied, migrate your app and restart the
60 WSGI server and Celery under supervisord.