From 9c0bc042ff699a811e99759e430d5ebc22390216 Mon Sep 17 00:00:00 2001 From: Ricky Wanga Date: Mon, 23 Mar 2026 12:55:25 +0100 Subject: [PATCH] feat: add grimmory service and database configuration to compose template --- public/svgs/grimmory.svg | 4 +++ templates/compose/grimmory.yaml | 49 +++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 public/svgs/grimmory.svg create mode 100644 templates/compose/grimmory.yaml diff --git a/public/svgs/grimmory.svg b/public/svgs/grimmory.svg new file mode 100644 index 000000000..cd8230fa2 --- /dev/null +++ b/public/svgs/grimmory.svg @@ -0,0 +1,4 @@ + + + + diff --git a/templates/compose/grimmory.yaml b/templates/compose/grimmory.yaml new file mode 100644 index 000000000..aae7c785e --- /dev/null +++ b/templates/compose/grimmory.yaml @@ -0,0 +1,49 @@ +# documentation: https://github.com/grimmory-tools/grimmory +# slogan: Grimmory is a self-hosted application for managing your entire book collection in one place. Organize, read, annotate, sync across devices, and share without relying on third-party services. +# tags: books,ebooks,library,reader +# logo: svgs/grimmory.svg +# port: 80 + +services: + grimmory: + image: 'grimmory/grimmory:latest' + environment: + - SERVICE_URL_GRIMMORY_80 + - 'USER_ID=${GRIMMORY_USER_ID:-0}' + - 'GROUP_ID=${GRIMMORY_GROUP_ID:-0}' + - 'TZ=${TZ:-UTC}' + - 'DATABASE_URL=jdbc:mariadb://mariadb:3306/${MARIADB_DATABASE:-grimmory-db}' + - 'DATABASE_USERNAME=${SERVICE_USER_MARIADB}' + - 'DATABASE_PASSWORD=${SERVICE_PASSWORD_MARIADB}' + - BOOKLORE_PORT=80 + volumes: + - 'grimmory-data:/app/data' + - 'grimmory-books:/books' + - 'grimmory-bookdrop:/bookdrop' + healthcheck: + test: 'wget --no-verbose --tries=1 --spider http://localhost/login || exit 1' + interval: 10s + timeout: 5s + retries: 10 + depends_on: + mariadb: + condition: service_healthy + + mariadb: + image: 'mariadb:12' + environment: + - 'MARIADB_USER=${SERVICE_USER_MARIADB}' + - 'MARIADB_PASSWORD=${SERVICE_PASSWORD_MARIADB}' + - 'MARIADB_ROOT_PASSWORD=${SERVICE_PASSWORD_MARIADBROOT}' + - 'MARIADB_DATABASE=${MARIADB_DATABASE:-grimmory-db}' + volumes: + - 'mariadb-data:/var/lib/mysql' + healthcheck: + test: + - CMD + - healthcheck.sh + - '--connect' + - '--innodb_initialized' + interval: 10s + timeout: 5s + retries: 10 \ No newline at end of file