X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f43c8bff6740bd9da629558539b0354c61a82062..d294463ea0288b62a518ff8f3c14ce493d930c45:/doc/installation.rst?ds=inline diff --git a/doc/installation.rst b/doc/installation.rst index 6c801c4c4..3b16bbb32 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -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.7 <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:: + celery -A wolnelektury worker --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.