Update the docs to show how badly are changes needed.
[wolnelektury.git] / doc / installation.rst
index 6c801c4..32e46e5 100644 (file)
@@ -1,43 +1,62 @@
-==========
-Instalacja
-==========
+=====
+Setup
+=====
 
-Wymagania
----------
-Do działania serwisu wymagane są:
+Requirements
+------------
 
-* `Python 2.5 <http://python.org>`_
-* `Django 1.0 <http://djangoproject.com>`_
-* `lxml 2.2 <http://codespeak.net/lxml/>`_
+* `Python 2.6+ <http://python.org>`_
+* Python requiremets: ``pip install -r requirements.txt``
+* a library for your database of choice
+  (see `DBs supported by Django <http://docs.djangoproject.com/en/dev/topics/install/#get-your-database-running>`_)
+* `Sass <http://sass-lang.com>`_ >= 3.2 for parsing SCSS stylesheets
+* Librarian (bundled as a git submodule, remember to ``git submodule update --init``
+* Librarian has more dependencies if you want to build PDF and MOBI files, 
+  see lib/librarian/README.md
+* `Solr <https://lucene.apache.org/solr/>`_ server if you want to search
 
-Jeżeli używasz Pythona 2.4 lub chcesz użyć bazy danych innej niż SQLite, wymagana jest jeszcze:
 
-* biblioteka do obsługi wybranej bazy danych (`biblioteki wspierane przez Django <http://docs.djangoproject.com/en/dev/topics/install/#get-your-database-running>`_)
+Running
+-------
+Set up the database with::
 
-Do pracy nad dokumentacją, którą teraz czytasz, potrzebne są:
+    ./manage.py syncdb --migrate
 
-* `Sphinx 0.6.2 <http://sphinx.pocoo.org/>`_ i zależności
+Run the dev server with::
 
-Wyższe wersje wymienionych powyżej bibliotek i aplikacji powinny działać równie dobrze, aczkolwiek nie było to testowane.
+    ./manage.py runserver
 
-Uruchomienie
-------------
-Po instalacji wszystkich zależności należy ściągnąć kod serwisu poleceniem::
-    
-    git clone http://jakies.repozytorium.pewnie.github
+Some tasks (like generating e-books) run in a seperate
+Celery process by default, so you'll also need to run::
 
-Następnie należy zainstalować bazę danych::
-    
-    cd wolnelektury/wolnelektury
-    ./manage.py syncdb
-    
-Oraz zaimportować lektury z katalogu books::
+    ./manage.py celeryd --loglevel=INFO
 
-    ./manage.py importbooks ../books
+Or, if you don't want to run a separate Celery daemon, set this
+in your ``localsettings.py``::
 
-Teraz wystarczy uruchomić serwer deweloperski poleceniem::
-    
-    ./manage.py runserver
-    
-W wyniku powinniśmy otrzymać całkiem funkcjonalny serwer.
+    CELERY_ALWAYS_EAGER = True
+
+
+Deployment
+----------
+Setup your server in fabfile.py and do::
+
+    fab <your_server_name> deploy
+
+Initial deploy will stop and ask you to provide a localsettings.py file.
+A sample localsettings.py will be put on your server, as well as
+sample configuration for `Nginx <http://nginx.org/>`_,
+`Gunicorn <http://gunicorn.org/>`_ and
+`Supervisord <http://supervisord.org/>`_.
+
+
+Publishing books
+----------------
+
+Books are represented as XML files.
+You can import XML files from a directory by running::
+
+    ./manage.py importbooks ../books
 
+Or you can publish a single XML by using publishing form in admin,
+or the publishing API.