Add persistent sessions using redis
This commit is contained in:
parent
62581af152
commit
4467f1f022
|
@ -9,6 +9,7 @@
|
||||||
- Create yourself a user using `sqlite3`
|
- Create yourself a user using `sqlite3`
|
||||||
- Install [nginx-mod-rtmp](https://git.zotan.services/zotan/nginx-mod-rtmp) (arch package: `aur/nginx-mod-rtmp-lhaus-git`)
|
- Install [nginx-mod-rtmp](https://git.zotan.services/zotan/nginx-mod-rtmp) (arch package: `aur/nginx-mod-rtmp-lhaus-git`)
|
||||||
- Configure nginx-mod-rtmp, example config below
|
- Configure nginx-mod-rtmp, example config below
|
||||||
|
- Install and start `redis` for persistent sessions
|
||||||
- Start RTMPDash, example systemd unit below
|
- Start RTMPDash, example systemd unit below
|
||||||
|
|
||||||
## Further setup
|
## Further setup
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="linq2db" Version="3.2.3" />
|
<PackageReference Include="linq2db" Version="3.2.3" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.2" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.2" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||||
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.113.7" />
|
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.113.7" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,17 @@ namespace RTMPDash {
|
||||||
|
|
||||||
#if (DEBUG)
|
#if (DEBUG)
|
||||||
services.AddControllers().AddRazorRuntimeCompilation();
|
services.AddControllers().AddRazorRuntimeCompilation();
|
||||||
|
services.AddStackExchangeRedisCache(options => {
|
||||||
|
options.Configuration = "localhost";
|
||||||
|
options.InstanceName = "RTMPdash_development";
|
||||||
|
});
|
||||||
#else
|
#else
|
||||||
services.AddControllers();
|
services.AddControllers();
|
||||||
|
services.AddStackExchangeRedisCache(options =>
|
||||||
|
{
|
||||||
|
options.Configuration = "localhost";
|
||||||
|
options.InstanceName = "RTMPdash_production";
|
||||||
|
});
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue