X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f43c8bff6740bd9da629558539b0354c61a82062..f29c8cb6c8bb788fe4dcd93f59dee829d1281c69:/doc/installation.rst 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 `_ -* `Django 1.0 `_ -* `lxml 2.2 `_ +* `Python 2.7 `_ +* Python requiremets: ``pip install -r requirements.txt`` +* a library for your database of choice + (see `DBs supported by Django `_) +* `Sass `_ >= 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 `_ 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 `_) +Running +------- +Set up the database with:: -Do pracy nad dokumentacją, którą teraz czytasz, potrzebne są: + ./manage.py syncdb --migrate -* `Sphinx 0.6.2 `_ 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 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 `_, +`Gunicorn `_ and +`Supervisord `_. + + +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.