eikek / docspell

Assist in organizing your piles of documents, resulting from scanners, e-mails and other sources with miminal effort.
https://docspell.org
GNU Affero General Public License v3.0
1.64k stars 125 forks source link

Unix socket for database connection #2166

Open juantxorena opened 1 year ago

juantxorena commented 1 year ago

This is a follow-up of the bug #622, but I cannot reopen it, so I open a new one.

There is a library that allows using an unix socket for connecting to the database, junixsocket. I have used it with keycloak, and you only have to add the dependencies to maven, or whatever scala uses. Then, the connection URL something like this (in my case with postgresql):

jdbc:postgresql://localhost/keycloakdb?socketFactory=org.newsclub.net.unix.AFUNIXSocketFactory$FactoryArg&socketFactoryArg=/mnt/postgresql/.s.PGSQL.5432&sslmode=disable

I would simply add this dependency, it's very easy and faster if the DB and docspell are in the same machine.

eikek commented 1 year ago

Hi @juantxorena - sorry for the delay. So if that is so simple, I'm ok for adding it. The only thing to check/consider is how many transitive dependencies this thing pulls in. For something not centric to the features I would hesitate if it pulls in a lot of stuff. Otherwise I'm happy to merge PRs 😄 (perhaps a small doc update would also be nice)