-
-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Adding postgres support to ombi (beta) #5050
Conversation
e9bdad6
to
de9cdd4
Compare
de9cdd4
to
ac77a31
Compare
…ut to use minutes so they only break for a cuple minutes instead.
0b90e87
to
fffe308
Compare
After further testing, I made a few updates:
|
Just chiming in to note, I've been testing this for ~5 weeks now, all without issue - going through the request history, it looks like users requested 11 series and 14 movies in that time (normal usage). In an attempt to 'stress' the app, I'd added 4 multi-season TV series (~430 episodes combined) along with 8 movies, all in rapid succession; all went without a hitch, and was still more performant than adding a single series with the sqlite DB, at least to my eyes! 😮 Great work @dben ! |
Thanks for the testing - I've been running this PR as well on my personal instance since December, and haven't had any issues, although I've only had about a half dozen new movies and seven shortish tv shows added during that time. |
could you provide a working example for database.json, it will also be easier to update the docs later based on this |
sure, here's what I use (with the passwords redacted) - you can use separate databases too, but they all work lumped together: {
"OmbiDatabase": {
"Type": "Postgres",
"ConnectionString": "Host=127.0.0.1;Port=5432;Database=ombi;Username=postgres;Password=password"
},
"SettingsDatabase": {
"Type": "Postgres",
"ConnectionString": "Host=127.0.0.1;Port=5432;Database=ombi;Username=postgres;Password=password"
},
"ExternalDatabase": {
"Type": "Postgres",
"ConnectionString": "Host=127.0.0.1;Port=5432;Database=ombi;Username=postgres;Password=password"
} |
Considering people have been using this, i'll get this merged in soon |
@dben I'm getting the following exception trying to launch with the Postgres connection. I exported the *.db files and imported the tables and content into Postgres. Created the database.json file and put it in the /opt/Ombi directory. I'm running 4.44.1 on Ubuntu 23.04. This is the startup command I'm using:
Database.json:
The Exception and Crash:
|
I saw the feature suggestion at https://features.ombi.io/suggestions/127609/add-postgresql-as-a-database-provider and thought It would be nice and quick to implement, as the *arrs all have postgres support but not mySql support built in.
This should be pretty straightforward - I added NpgSql and generated the migrations for it, then updated
DatabaseExtensions.cs
.I've also built a docker image that includes this, based on the LinuxServer Ombi container at
ghcr.io/dben/ombi:latest
.In my personal testing deploying the image in my nomad cluster, this appears to work identically to the mysql provider, at least for my setup (plex/radarr/sonarr/email notifications). Since it's just EF I woudn't expect too much divergence.