Casvt / Kapowarr

Kapowarr is a software to build and manage a comic book library, fitting in the *arr suite of software.
https://casvt.github.io/Kapowarr/
GNU General Public License v3.0
348 stars 12 forks source link

Override database location #157

Open OneCDOnly opened 2 months ago

OneCDOnly commented 2 months ago

Hello, my apologies for asking what may be a simple question.

Is there a way to specify the location of the config and database files when launching Kapowarr? It seems this is supported in the other *arr applications, but I've been unable to locate any information about Kapowarr to confirm if it does too.

I maintain a package of Kapowarr for QNAP NAS that updates from GitHub on each startup. I'm not intimately familiar with Kapowarr usage: as a packager, I usually only check that the application installs and launches properly.

The problem is the present location of Kapowarr.db is inside the local git clone (called repo-cache), which I'd like to avoid.

At present, I launch with:

/share/CACHEDEV1_DATA/.qpkg/Kapowarr/venv/bin/python3 \
/share/CACHEDEV1_DATA/.qpkg/Kapowarr/repo-cache/Kapowarr.py \
--daemon \
--nolaunch \
--datadir /share/CACHEDEV1_DATA/.qpkg/Kapowarr/config \
--config /share/CACHEDEV1_DATA/.qpkg/Kapowarr/config/config.ini \
--pidfile /var/run/Kapowarr.pid

Can anyone please advise? Am I using the correct command-line arguments? Cheers.

Casvt commented 2 months ago

Kapowarr doesn't take any flags, because it simply doesn't need it. So everything you're supplying doesn't do anything. Kapowarr has a database at db/Kapowarr.db and that's it. So I can add a flag for overriding the database location, but in the mean time maybe use hardlinks?

BTW, it's advised to download the latest release on GitHub instead of cloning the development branch.

OneCDOnly commented 2 months ago

Hi Cas, and thanks for responding.

Yes, I'll be modifying this package to use the latest release version instead of the development branch. 👍🏽

So, this application takes no arguments? config.ini isn't needed? Okiedoke.

Thanks for advising me on this. Cheers!

Casvt commented 2 months ago

All configuration and data is stored in the database. It's simple and makes it easy as all your instance data is stored in one file, in one place. Download Kapowarr anywhere and anyway you want, enter the database file and done, everything is taken care of; you have your own instance again. It also makes backups easy.

It's a good idea to allow overriding the database location because it makes it possible to keep the database file separate from the application folder, which indeed can changed when updating or with setups where every startup it's newly downloaded.