Skip to content

feat: add Unraid community app template#62

Open
gtronset wants to merge 5 commits intogrimmory-tools:mainfrom
gtronset:feat/unraid-template-clean
Open

feat: add Unraid community app template#62
gtronset wants to merge 5 commits intogrimmory-tools:mainfrom
gtronset:feat/unraid-template-clean

Conversation

@gtronset
Copy link

@gtronset gtronset commented Mar 19, 2026

📝 Description

Linked Issue: Addresses #20

Caution

This PR should remain in Draft until proper container releases are available!

🏷️ Type of Change

  • Bug fix
  • New feature
  • Enhancement to existing feature
  • Refactor (no behavior change)
  • Breaking change (existing functionality affected)
  • Documentation update

🔧 Changes

This PR adds an unraid.xml template file to the root of the repository, which, when added to the Unraid "Community Applications" (CA) store, allows easy container installation for Unraid users (generally, the "default" way Unraid handles Docker and containers).

  • Adds unraid.xml
  • Preconfigures required items: port, volume mounts, database env vars, timezone
  • Adds advanced config for DISK_TYPE and ALLOWED_ORIGINS
  • Adds "Requires" note about MariaDB dependency

🧪 Testing (MANDATORY)

PRs without this section filled out will be closed. "Tests pass" or "Tested locally" is not sufficient. You must provide specifics.

Manual testing steps you performed:

  1. Installed the template on my Unraid server
  2. Configured it with a MariaDB instance
  3. Verified the web UI loaded
  4. Verified database connectivity
  5. Tested library scanning

Regression testing:

  • N/A

Edge cases covered:

  • Tested advanced ENV worked for DISK_TYPE and ALLOWED_ORIGINS

Test output:

  • N/A

📸 Screen Recording / Screenshots (MANDATORY)

grimmory-unraid

✅ Pre-Submission Checklist

All boxes must be checked before requesting review. Incomplete PRs will be closed without review. No exceptions.

  • This PR is linked to an approved issue
  • Code follows project backend and frontend conventions
  • Branch is up to date with develop (merge conflicts resolved)
  • I ran the full stack locally (backend + frontend + database) and verified the change works
  • Automated tests added or updated to cover changes (backend and frontend)
  • All tests pass locally and output is pasted above
  • Screen recording or screenshots are attached above proving the change works
  • PR is a single focused change (one bug fix OR one feature, not multiple unrelated changes)
  • PR is reasonably scoped (PRs over 1000+ changed lines will be closed, split into smaller PRs)
  • No unsolicited refactors, cleanups, or "improvements" are bundled in
  • Flyway migration versioning is correct (if schema was modified)
  • Documentation PR submitted to booklore-docs (if user-facing changes)

🤖 AI-Assisted Contributions

If any part of this PR was generated or assisted by AI tools (Copilot, Claude, ChatGPT, etc.), all items below are mandatory. You are fully responsible for every line you submit. "The AI wrote it" is not an excuse, and AI-generated PRs that clearly haven't been reviewed are the #1 reason PRs get closed.

  • I have read and understand every line of this PR and can explain any part of it during review
  • I personally ran the code and verified it works (not just trusted the AI's output)
  • PR is scoped to a single logical change, not a dump of everything the AI suggested
  • Tests validate actual behavior, not just coverage (AI-generated tests often assert nothing meaningful)
  • No dead code, placeholder comments, TODOs, or unused scaffolding left behind by AI
  • I did not submit refactors, style changes, or "improvements" the AI suggested beyond the scope of the issue

💬 Additional Context (optional)

This template allows Unraid users to install the Grimmory container directly from the CA store with minimal setup (it pre-fills the necessary ports, volume mappings, and environment variables recommended in the compose). Having it alongside the application code and in this repo makes it easy to change any container-related item and keep it correct/compatible with the latest release. These templates effectively translate to a docker run command, which users actually see once they load/save the container from the CA store. Example of what it translates to:

docker run
  -d
  --name='Grimmory'
  --net='bridge'
  --pids-limit 2048
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="unraid-server"
  -e HOST_CONTAINERNAME="Grimmory"
  -e 'DATABASE_URL'='jdbc:mariadb://10.0.0.10:3307/grimmory'
  -e 'DATABASE_USERNAME'='grimmory'
  -e 'DATABASE_PASSWORD'='ChangeMe_Grimmory_2025!'
  -e 'TZ'='America/Los_Angeles'
  -e 'DISK_TYPE'='LOCAL'
  -e 'ALLOWED_ORIGINS'='*'
  -e 'USER_ID'='99'
  -e 'GROUP_ID'='100'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:6060]/'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/grimmory-tools/grimmory/main/assets/logo.svg'
  -p '6060:6060/tcp'
  -v '/mnt/user/appdata/grimmory':'/app/data':'rw'
  -v '/mnt/user/data/media/ebooks/':'/data/media/books':'rw'
  -v '/mnt/user/data/media/bookdrop':'/bookdrop':'rw'
  --restart=unless-stopped 'ghcr.io/grimmory-tools/grimmory:latest'

This translation occurs automatically based on values in the template.

MariaDB

Unraid CA templates only allow for a singular container to be specified. Unless Grimmory wants to provide an all-in-one (AIO) option (doubtful!), users will also have to install a MariaDB container. This is very common! I've made a call-out in the template that they'll need to install the additional container for this to work.

Getting Grimmory into the CA Store

In order for this to be available in the CA Store, a maintainer would need to apply to have it added via a Community Applications submission form. This form is very short and self-explanatory. Usually, a repo is approved within 24-48 hours, though that, too, is a manual process. Despite what it says, you shouldn't need to create a forum thread (there are links to your support outlets as part of the template).

Once accepted, the CA scraper checks the repo frequently for updates (I think it's about every 2 hours).

Alternatively--and I don't think this is the best route for this repo--I maintain a dedicated templates repository (tritones/unraid-templates) that is already published in the store. If maintainers want to go this route we'd close this PR and open one in my repo.

Permissions

Unraid's standard user and group are 99 and 100, respectively, and these are prefilled for users.

Links and Helpful Info

To understand what this file does or how the formatting works:

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 19, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7deb2674-9c1a-46e7-8138-d8f0d9d1f4d6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.

Change the reviews.profile setting to assertive to make CodeRabbit's nitpick more issues in your PRs.

@balazs-szucs
Copy link
Member

Hi,

what's the blocker on this PR?

@gtronset
Copy link
Author

@balazs-szucs Outside of a very minor commit I just added, I've held off just in case there were any container config-related changes for this initial release, but I think that's unlikely at this point so it should be good to go (assuming there will be a latest tag). This won't be available from within Unraid until a maintainer applies to have it added (see Getting Grimmory into the CA Store in my PR description), so it's safe to merge ahead of a release.

Let me know when I'm good to move it out of draft 😄

@gtronset gtronset marked this pull request as ready for review March 20, 2026 23:13
@gtronset
Copy link
Author

@balazs-szucs (or to whom it may concern) I'm pencils-down on this now that GHCR images are available. Please note that after merging a maintainer will need to submit this to the Unraid app store (CA Store) as I mention in Getting Grimmory into the CA Store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants