limited stopwords + better search by author + remove descendant results
[wolnelektury.git] / doc / installation.rst
1 =====
2 Setup
3 =====
4
5 Requirements
6 ------------
7
8 * `Python 2.7 <http://python.org>`_
9 * Python requiremets: ``pip install -r requirements.txt``
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 * `Sass <http://sass-lang.com>`_ >= 3.2 for parsing SCSS stylesheets
13 * Librarian (bundled as a git submodule, remember to ``git submodule update --init``
14 * Librarian has more dependencies if you want to build PDF and MOBI files, 
15   see lib/librarian/README.md
16 * `Solr <https://lucene.apache.org/solr/>`_ server if you want to search
17
18
19 Running
20 -------
21 Set up the database with::
22
23     ./manage.py syncdb --migrate
24
25 Run the dev server with::
26
27     ./manage.py runserver
28
29 Some tasks (like generating e-books) run in a seperate
30 Celery process by default, so you'll also need to run::
31
32     celery -A wolnelektury worker --loglevel=INFO
33
34 Or, if you don't want to run a separate Celery daemon, set this
35 in your ``localsettings.py``::
36
37     CELERY_ALWAYS_EAGER = True
38
39
40 Deployment
41 ----------
42 Setup your server in fabfile.py and do::
43
44     fab <your_server_name> deploy
45
46 Initial deploy will stop and ask you to provide a localsettings.py file.
47 A sample localsettings.py will be put on your server, as well as
48 sample configuration for `Nginx <http://nginx.org/>`_,
49 `Gunicorn <http://gunicorn.org/>`_ and
50 `Supervisord <http://supervisord.org/>`_.
51
52
53 Publishing books
54 ----------------
55
56 Books are represented as XML files.
57 You can import XML files from a directory by running::
58
59     ./manage.py importbooks ../books
60
61 Or you can publish a single XML by using publishing form in admin,
62 or the publishing API.