Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (51 loc) · 2.08 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (51 loc) · 2.08 KB
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
# One command to get running:
#
# docker compose up -d
#
# Then open http://<your-host>:5888 and register the first account, which
# automatically becomes the instance admin.
services:
reader:
# CI publishes branch and commit tags; it does not publish :latest.
# Pin READER_IMAGE to a published commit tag for repeatable upgrades.
image: ${READER_IMAGE:-cnb.cool/hectorqin/reader:main}
# To build from source instead of pulling the published image. The context is
# the repository root because the image bakes in the H5 client built from
# ./web as well as the server.
# build:
# context: .
# dockerfile: server/Dockerfile
container_name: reader
restart: unless-stopped
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
ports:
- "5888:5888"
environment:
# Business settings are managed in the administrator UI and persisted in /data.
LOG_LEVEL: "info"
# Directory holding the built H5 client, served at `/`. Already set in the
# image; only override if you build the client separately.
# WEB_DIR: "/app/web"
volumes:
# --- your books ---
# Use :ro for a browse-only deployment. Use :rw if an administrator
# should upload, rename, move or delete files from the web file manager.
- /path/to/your/books:/books:ro
# Optional media roots, independent of the reading library. After mounting,
# create media libraries in the UI using /media/video, /media/music, etc.
# The application only reads media files; keep these mounts read-only.
# - /path/to/your/videos:/media/video:ro
# - /path/to/your/music:/media/music:ro
# - /path/to/your/audiobooks:/media/audiobook:ro
# --- server-owned writable data ---
# SQLite database, cover cache, scan journal, upload staging and plugins.
- ./data:/data
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:5888/api/v1/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3