Skip to content

rogly/Jellyfin.Pgsql

 
 

Repository files navigation

The Unoffical Postgre SQL adapter for the jellyfin server

This adds postgres SQL support via an plugin to the jellyfin server. There are several steps required to make this work and it is to be considered HIGHLY experimental.

How to use it

You can use your existing jellyfin compose file and change the image accordingly to: ghcr.io/jpvenson/jellyfin.pgsql:10.11.0-1.

You need to add the connection paramters as enviorment variables in your compose file:

services:
  jellyfin:
    image: ghcr.io/jpvenson/jellyfin.pgsql:10.11.0-1
    volumes:
        - /path/to/config:/config
        - /path/to/cache:/cache
        - /path/to/media:/media
    environment:
        - POSTGRES_HOST=
        - POSTGRES_PORT=
        - POSTGRES_DB=jellyfin
        - POSTGRES_USER=jellyfin
        - POSTGRES_PASSWORD=jellyfin

Build

Checkout the Jellyfin submodule. Use dotnet build to build the plugin. Place the plugin in the plugin folder of the JF app. Update the database.xml file to switch to the plugin as its database provider:

<?xml version="1.0" encoding="utf-8"?>
<DatabaseConfigurationOptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <DatabaseType>PLUGIN_PROVIDER</DatabaseType>
  <CustomProviderOptions>
    <PluginAssembly>../../../Jellyfin.Plugin.Pgsql/bin/debug/net9.0/Jellyfin.Plugin.Pgsql.dll</PluginAssembly>
    <PluginName>PostgreSQL</PluginName>
    <ConnectionString>CONNECTION_STRING_TO_LOCAL_PGSQL_SERVER</ConnectionString>
  </CustomProviderOptions>
  <LockingBehavior>NoLock</LockingBehavior>
</DatabaseConfigurationOptions>

launch your jellyfin server.

Add migration

Run dotnet ef migrations add {MIGRATION_NAME} --project "/workspaces/Jellyfin.Pgsql/Jellyfin.Plugin.Pgsql" -- --migration-provider Jellyfin-PgSql

Release flow

To create a new release, first sync all Jellyfin server changes then create a new migration as seen above. After that create a new efbundle: dotnet ef migrations bundle -o docker/jellyfin.PgsqlMigrator.dll -r linux-x64 --self-contained --project "/workspaces/Jellyfin.Pgsql/Jellyfin.Plugin.Pgsql" -- --migration-provider Jellyfin-PgSql Then build the container

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 92.9%
  • Shell 4.2%
  • HTML 1.5%
  • Dockerfile 1.4%