mirror of
https://github.com/hectorqin/reader.git
synced 2026-11-10 21:11:08 +08:00
53 lines
2.1 KiB
YAML
53 lines
2.1 KiB
YAML
# 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
|