diff --git a/apps/grimmory/README.md b/apps/grimmory/README.md new file mode 100644 index 0000000..a82e054 --- /dev/null +++ b/apps/grimmory/README.md @@ -0,0 +1,19 @@ +## First login + +The first visit asks you to create the admin account, so until you've done that only you can open the app. Open it from your Cottage dashboard, fill in your name, username and password, then choose **Done** on the app's page so anyone you share the address with can reach it. + +## Your first library + +Create a library and choose the folder `/books` for it. Then use **Upload** to add books straight from your computer. Grimmory looks up covers, authors and descriptions as it adds them. + +Files dropped into the Bookdrop (`/bookdrop`) wait for you to review their details before they join a library, which is handy for big imports. + +Add accounts for others under **Settings → Users**. Outbound mail ports are blocked on Cottage, so the send-to-Kindle email feature won't work here; use the Kobo or KOReader sync instead. + +## Reading on other devices + +Under **Settings** you'll find Kobo sync, KOReader sync and OPDS. Each gives you an address to paste into the device or reader app, starting with your app's full `https://` address. + +## Export your data + +Every book can be downloaded from its page, and your library folders keep the files as they were uploaded. Cottage also keeps nightly backups of the whole app, database included. diff --git a/apps/grimmory/cottage.yml b/apps/grimmory/cottage.yml new file mode 100644 index 0000000..805f3da --- /dev/null +++ b/apps/grimmory/cottage.yml @@ -0,0 +1,18 @@ +name: Grimmory +tagline: A home library for your ebooks, with shelves that fill themselves. +category: Reading +description: >- + Upload EPUBs, PDFs and comics and Grimmory fetches covers and metadata, sorts + them onto shelves and smart shelves, and opens them in its built-in reader. + Kobo and KOReader sync, OPDS and accounts for the whole household. +upstream: https://github.com/grimmory-tools/grimmory/tree/v3.5.1 +website: https://grimmory.org +license: AGPL-3.0-only +images: + - ref: grimmory/grimmory:v3.5.1 + digest: sha256:678d8e8af92f3587d4cfae28ffbe44854105ea56fed6b9590fc56b454f512585 + - ref: mariadb:11.4.13 + digest: sha256:a8992b5e5404d11e03c54a31d0c1bdea3fd116d283aa6d1a627551f29045309b +mobile_apps: true +# The first visit creates the admin account. +first_visit_claims_admin: true diff --git a/apps/grimmory/icon.svg b/apps/grimmory/icon.svg new file mode 100644 index 0000000..a215231 --- /dev/null +++ b/apps/grimmory/icon.svg @@ -0,0 +1 @@ + diff --git a/apps/grimmory/template.yml b/apps/grimmory/template.yml new file mode 100644 index 0000000..8ed8b42 --- /dev/null +++ b/apps/grimmory/template.yml @@ -0,0 +1,60 @@ +# Grimmory: a multi-user digital library for ebooks, PDFs and comics, with MariaDB. +x-harbor: + slug: grimmory + name: Grimmory + description: Self-hosted digital library with a built-in reader. + version: "3.5.1-c1" + primary: { service: app, port: 6060 } + health_path: /api/v1/healthcheck + default_resources: { cpu_millis: 1000, memory_mb: 1536, storage_mb: 20480 } + min_resources: { cpu_millis: 500, memory_mb: 1024, storage_mb: 2048 } + weights: { app: 3, db: 1 } + volumes: + data: { uid: 1000, gid: 1000, mode: "0750" } + books: { uid: 1000, gid: 1000, mode: "0750" } + bookdrop: { uid: 1000, gid: 1000, mode: "0750" } + db_data: { uid: 999, gid: 999, mode: "0750" } + parameters: + - { key: DB_PASSWORD, label: Database password, type: string, secret: true, generate: random32 } + - { key: DB_ROOT_PASSWORD, label: Database root password, type: string, secret: true, generate: random32 } + +services: + app: + image: grimmory/grimmory:v3.5.1 + user: "1000:1000" + # The image's entrypoint creates a user and drops privileges with su-exec, + # which a non-root container can't do. The volumes already belong to + # uid 1000, so start the server directly. + entrypoint: [ "java", "--enable-native-access=ALL-UNNAMED", "--enable-preview", "-XX:-UseBASE64Intrinsics", "-jar", "/app/app.jar" ] + command: [] + depends_on: + db: { condition: service_healthy } + environment: + DATABASE_URL: "jdbc:mariadb://db:3306/grimmory" + DATABASE_USERNAME: grimmory + DATABASE_PASSWORD: ${DB_PASSWORD} + SWAGGER_ENABLED: "false" + ALLOWED_ORIGINS: ${HARBOR_PUBLIC_URL} + volumes: + - "data:/app/data" + - "books:/books" + - "bookdrop:/bookdrop" + db: + image: mariadb:11.4.13 + user: "999:999" + environment: + MARIADB_DATABASE: grimmory + MARIADB_USER: grimmory + MARIADB_PASSWORD: ${DB_PASSWORD} + MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} + volumes: [ "db_data:/var/lib/mysql" ] + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + interval: 5s + retries: 30 + +volumes: + data: + books: + bookdrop: + db_data: