about summary refs log tree commit diff stats
path: root/README.md
blob: cb4013810fd112ef855466937ed1fe564c2bc891 (plain) (blame)
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
73
74
75
76
77
78
79
80
81
82
83
The Epube
=========

Self-hosted web EPUB reader backed by a Calibre library.

Features
--------

- Reads metadata and books from a Calibre library (metadata.db + books directory)
- Full EPUB reader with pagination, table of contents, and search within books
- Offline/PWA support via service worker and IndexedDB caching
- Reading progress tracking per user, synced between sessions
- Favorites system
- Multi-user authentication (local or OpenID Connect)
- Downloads in any format Calibre holds (EPUB, MOBI, etc.)
- Series and author browsing with search
- Night mode, customizable font family/size/line-height
- Word definition lookup via optional dictionary service (dictd)

Requirements
------------

- PHP 7.1+
- SQLite or PostgreSQL
- A Calibre library directory
- HTTPS recommended (required for service worker registration)

Installation
------------

1. Clone this repository.
2. Run `npm install & npm run build`.
3. Copy `.env-dist` to `.env` and configure paths and credentials.
4. Ensure the `db/` directory is writable (for SQLite) or set `EPUBE_DB_TYPE=pgsql` for PostgreSQL.
5. Point your web server at the repository root.

Docker
------

Development and production deployment via docker-compose:

    docker compose up

The default setup includes PostgreSQL, the application, and an Nginx frontend.
See `.env-dist` for configuration options.

Development
-----------

Run the stack with the dev overlay, which bind-mounts the source tree into the
`app` and `web-nginx` containers and exposes PostgreSQL on `127.0.0.1:15432`:

    npm run dev            # docker compose -f docker-compose.yml -f docker-compose.dev.yml
    npm run dev -- up
    npm run dev -- up -d app
    npm run dev -- logs -f app

The overlay is deliberately plain Compose (no `!override` YAML tag), so it works
with both Docker Compose and `podman-compose`, which only concatenates the volume
lists of the two files and keeps the last entry per mount target.

Docker Compose v2.24+ users who prefer auto-loading may keep a local
`docker-compose.override.yml` instead, where the `!override` tag replaces volume
lists outright:

```yaml
services:
  app:
    volumes: !override
      - .:/var/www/html/books
      - ${BOOKS_DIR}:/books:ro
```

Note that `podman-compose` cannot parse that tag and loads
`docker-compose.override.yml` automatically, so remove or rename the file if you
use `podman-compose` without explicit `-f` arguments.

License
-------

GNU GPL version 3. See COPYING for details.

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