X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f43c8bff6740bd9da629558539b0354c61a82062..86c5466e322ab6e30aac5ab672ee777bf181ed9c:/doc/installation.rst?ds=sidebyside diff --git a/doc/installation.rst b/doc/installation.rst index 6c801c4c4..78ca3ccbb 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -1,43 +1,60 @@ -========== -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>`_ +* Everyting from the ``requirements.txt`` file +* a library for your database of choice + (see `DBs supported by Django <http://docs.djangoproject.com/en/dev/topics/install/#get-your-database-running>`_) +* `pyLucene <https://github.com/fnp/pylucene/>`_ for search +* Librarian dependencies for generating PDF and MOBI files, + see lib/librarian/README.md -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>`_) +Installation +------------ +Installing database:: -Do pracy nad dokumentacjÄ , którÄ teraz czytasz, potrzebne sÄ : + cd wolnelektury + ./manage.py syncdb + ./manage.py migrate -* `Sphinx 0.6.2 <http://sphinx.pocoo.org/>`_ i zależnoÅci -Wyższe wersje wymienionych powyżej bibliotek i aplikacji powinny dziaÅaÄ równie dobrze, aczkolwiek nie byÅo to testowane. +Running +------- -Uruchomienie ------------- -Po instalacji wszystkich zależnoÅci należy ÅciÄ gnÄ Ä kod serwisu poleceniem:: - - git clone http://jakies.repozytorium.pewnie.github +You can run the server with:: -NastÄpnie należy zainstalowaÄ bazÄ danych:: - - cd wolnelektury/wolnelektury - ./manage.py syncdb - -Oraz zaimportowaÄ lektury z katalogu books:: + ./manage.py runserver - ./manage.py importbooks ../books +If you want to run lengthy tasks (like generating e-book files) in a seperate +Celery process (this is the default), you'll also need to run: -Teraz wystarczy uruchomiÄ serwer deweloperski poleceniem:: - - ./manage.py runserver - -W wyniku powinniÅmy otrzymaÄ caÅkiem funkcjonalny serwer. + ./manage.py celeryd --loglevel=INFO + +If you don't want to run a separate Celery daemon, make sure you set this +option in your ``localsettings.py``:: + + CELERY_ALWAYS_EAGER = True + + +Deployment +---------- +Setup your server in fabfile.py and do:: + + fab <your_server_name> setup + +Aside from uploading a current (git's HEAD) version of the app this will also +download all dependencies into a `virtualenv <http://www.virtualenv.org>`_, +create a VHost and WSGI files for running with Apache and mod_wsgi, and +a celery config file for `supervisord <http://supervisord.org/>`_. + +To deploy a new version into an existing setup, do: + + fab <your_server_name> deploy +This will also check for new dependencied, migrate your app and restart the +WSGI server and Celery under supervisord.