summaryrefslogtreecommitdiff
path: root/README.md
blob: 40e81856ef1eb3f0a5ecf9737e0877ab3a52d075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
The Epube
=========

web EPUB reader using EPUB.js, Bootstrap, and Calibre.

https://dev.tt-rss.org/fox/the-epube/wiki

Copyright (c) 2017 Andrew Dolgov (unless explicitly stated otherwise).

Requirements
============

* HTTPS: required for service workers to work
* PDO::sqlite
* Calibre books directory and metadata.db

Host installation
=================

Note: Consider using [docker-compose](https://dev.tt-rss.org/fox/the-epube/wiki#installation) instead. Most of the stuff below is handled for you automatically then.

```sh
git clone https://git.tt-rss.org/fox/the-epube.git the-epube
```

**WARNING:** since database folder is, by default, accessible for unauthenticated HTTP requests
it is recommended to set ``SCRATCH_DB`` to a secure random value (i.e. ``db/long-random-string.db``)
or put it outside of scope accessible by your http server. Alternatively, you can simply block access
to ``db``:

```nginx
location /the-epube/db {
   deny all;
}
```

1. Apply database migrations

```sh
php ./update.php --update-schema
```

2. Ensure both <code>scratch.db</code> and its containing folder (i.e. <code>db/</code>) are writable by the
application, normally this means chown-ing them as <code>www-data</code> or whatever user your httpd is running under.

```sh
chown www-data db/ db/scratch.db
```

3. Set path to Calibre, etc, in `config.php`:

```ini
putenv('EPUBE_BOOKS_DIR=/home/user/calibre/Books');
```

See `classes/config.php` for the list of settings.

4. Setup users via update.php (command line)

```
php ./update.php --help
```

Acknowledgements
================

Normal favicon from Silk icon pack - http://www.famfamfam.com/lab/icons/silk/

License
=======

GNU GPL version 3.