mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-04-20 22:09:28 -04:00
This commit adds user authentication, using Calibre-Web's app.db as its authentication source, as requested in #56. It uses @prinzpi's [comment](https://github.com/calibrain/calibre-web-automated-book-downloader/issues/56#issuecomment-2919335169) as a starting point, but integrates the logic directly into the app. This requires the user to specify the environment variable CONFIG_ROOT, set to Calibre-Web's config directory (the directory that contains the app.db database that holds the user's authentication information). If the user does not wish to add authentication, they can simply leave CONFIG_ROOT unset, or not pointing at Calibre-Web's app.db directory.
24 lines
752 B
YAML
24 lines
752 B
YAML
services:
|
|
calibre-web-automated-book-downloader:
|
|
image: ghcr.io/calibrain/calibre-web-automated-book-downloader:latest
|
|
environment:
|
|
FLASK_PORT: 8084
|
|
LOG_LEVEL: info
|
|
BOOK_LANGUAGE: en
|
|
USE_BOOK_TITLE: true
|
|
TZ: America/New_York
|
|
APP_ENV: prod
|
|
UID: 1000
|
|
GID: 100
|
|
CWA_DB_PATH: /auth/app.db
|
|
ports:
|
|
- 8084:8084
|
|
restart: unless-stopped
|
|
volumes:
|
|
# This is where the books will be downloaded to, usually it would be
|
|
# the same as whatever you gave in "calibre-web-automated"
|
|
- /tmp/data/calibre-web/ingest:/cwa-book-ingest
|
|
# This is the location of CWA's app.db, which contains authentication
|
|
# details
|
|
- /cwa/config/path/app.db:/auth/app.db:ro
|