mirror of
https://github.com/hectorqin/reader.git
synced 2026-11-12 05:50:54 +08:00
64 lines
2.9 KiB
YAML
64 lines
2.9 KiB
YAML
# One command to get running:
|
|
#
|
|
# docker compose up -d
|
|
#
|
|
# Then open http://<your-host>:8080 and register the first account, which
|
|
# automatically becomes the instance admin.
|
|
services:
|
|
reader:
|
|
image: cnb.cool/hectorqin/reader:latest
|
|
# 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
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
# Polling intervals in seconds. Set to 0 to disable (a manual scan is
|
|
# still available from the admin API).
|
|
SCAN_INTERVAL: "1800"
|
|
WATCH_INTERVAL: "60"
|
|
LOG_LEVEL: "info"
|
|
# Set this to the address you actually reach the server on, so download
|
|
# links work behind a reverse proxy.
|
|
# PUBLIC_URL: "https://reader.example.com"
|
|
# Uncomment to allow family members to self-register instead of the admin
|
|
# creating their accounts:
|
|
# ALLOW_REGISTRATION: "true"
|
|
# Origins allowed to call the API from a browser, comma separated.
|
|
# Empty (the default) reflects whatever origin asks. Fine for a LAN: the
|
|
# client does not know the address it will be reached on, and there are no
|
|
# cookies in the design. Set it if the instance is on the public internet:
|
|
# CORS_ORIGINS: "https://reader.example.com"
|
|
# 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"
|
|
|
|
# --- HTTP speech, for clients that have no engine of their own ---
|
|
# The server only *proxies*; it does not bundle a synthesizer, because
|
|
# that would multiply the image size and a NAS's CPU budget. Point this at
|
|
# any service that accepts the classic `?text=...&speed=...` shape
|
|
# (edge-tts, a local Piper wrapper, a commercial API with a shim).
|
|
#
|
|
# TTS_URL: "http://host.docker.internal:5002/tts"
|
|
# TTS_TOKEN: "" # bearer token, if the upstream wants one
|
|
# TTS_VOICES_URL: "" # defaults to <TTS_URL>/voices
|
|
# TTS_CACHE_BYTES: "268435456" # audio cache cap in /data; 0 disables
|
|
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
|
|
# --- 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:8080/api/v1/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|