feat: add support for sql-based databases#2506
feat: add support for sql-based databases#2506pkuwwt wants to merge 17 commits intofilebrowser:masterfrom
Conversation
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
813c2e9 to
66dfbb3
Compare
|
conflicts resolved @o1egl |
|
Can any effort be put into merging this? Filebrowser CLI cannot be used inside container or while it's running in general, because of the exclusive database lock. This is seriously inconvenient. I am forced at this point to either kill filebrowser every time I want to run a CLI command, or build this PR for use in production. This also affects automation and makes it difficult to programmatically add users (for example) based on other input. I would use the API but it is not documented and seems fiddly to use, #2551. |
|
I built this and merged with
|
|
@sevmonster |
|
Hey! Thanks for all the effort put into this. I do agree that this could be useful, but it's quite a large change and effort to maintain. As such, I am parking this now, but leaving the PR open. |
Description
Add sql support in addition to bolt, including sqlite3, postgres, mysql.
Most code are in
storage/sql, except a few lines incmd/root.goandcmd/utils.go.Usage
filebrowser -d sqlite3://test.db filebrowser -d 'postgres://user:[email protected]:5432/postgres?sslmode=disable'Reason
Bolt is a relative non-mainstream choice for storage. When someone use filebrowser as a component of a project, he/she will need a centralized storage server, e.g. postgres, mysql, other than bolt.