[FEAT]: Move some of the config options from file to database #651
Replies: 6 comments 1 reply
-
Thanks for opening this. EDIT: The more I thought about this last night, the more I realized that @onedr0p is right about this. While the pattern I am currently using has worked well for me, it's still hacky, and it's mostly a hangover from being limited by SQLite. Postgres implementation opens up new doors that are almost certainly better. For example, I could still bootstrap an initial configuration, and then rely on the migrations to do their thing. Secret rotation could be accomplished at runtime, using a sidecar or similar. |
Beta Was this translation helpful? Give feedback.
-
I think onedr0p made an excellent point, config files / env should only be declared (not changed during runtime) and everything that can and should be changed during runtime should be inside the database (like radarr, sonarr, prowlarr, etc.). |
Beta Was this translation helpful? Give feedback.
-
If anything, there's an opportunity to write automation for building out and bootstrapping jellyseerr with using the jellyseerr API so you can write 3rd party tools to help provision an instance of jellyseerr. However this is all overkill for me as it's a one-time process, if I was bootstrapping jellyseerr constantly I would look into contributing / writing tooling to help provide that functionality. |
Beta Was this translation helpful? Give feedback.
-
One thing I've realized is that moving certain parameters into the DB could potentially force a user into having to manually edit the DB, under certain (probably rare) circumstances. For example: My Jellyseerr instance uses Jellyfin as the sole authentication backend. If the URL of the Jellyfin server changes for some reason, and I don't update it in Jellyseerr beforehand, I will be completely locked out of the Web UI. If I'm not able to revert the networking environment to its previous state (let's say I have no ownership or control of it), then I'm forced to edit the endpoint URL manually. This generally wouldn't be an issue for those of us running Docker/Podman/K8s, or running virtual networks, etc. For users with more basic setups though, for example Proxmox + VMs/LXCs + networking that relies on their LAN's DHCP, this could end up forcing them into database surgery. Just something to consider. |
Beta Was this translation helpful? Give feedback.
-
Following the discussion in #186 (comment), I propose migrating everything currently stored in While a provisioning mechanism would be a nice addition, I believe it’s important to stay focused on the initial goal: eliminating the reliance on volumes for storing settings. Here’s my proposed re-implementation of the Settings module: Option 1: Single KV Table (Preferred)All existing settings would reside in a single table, using a key-value (KV) structure:
Note: Note 2: Having the This approach offers maximum flexibility and allows for an almost 1:1 migration, as the underlying data type (JSON) remains unchanged. A similar approach could be to store the entire Option 2: Multiple Domain-Specific TablesAlternatively, we could create separate tables for different domains of settings:
While this approach is more structured, it feels excessive to create multiple tables for similar entities. Additionally, any new fields would require writing new migrations, which could complicate maintenance. Bonus (Out of Scope)
|
Beta Was this translation helpful? Give feedback.
-
(quoting a discussion in the Postgres feature request issue)
While that may seem that way, the scope of current PR/issue for Postgres support was just put, to support Postgres with the current SQLite schema. While this may be an unpopular opinion and might be disappointing for most of you, and I hope you understand where we are coming from, after careful consideration, at least for now, we do not plan to migrate
That's our decision on this matter, for now. |
Beta Was this translation helpful? Give feedback.
-
Continuation of #628 (comment)
Beta Was this translation helpful? Give feedback.
All reactions