Add persistent sessions using redis
This commit is contained in:
parent
62581af152
commit
4467f1f022
|
@ -9,6 +9,7 @@
|
|||
- 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`)
|
||||
- Configure nginx-mod-rtmp, example config below
|
||||
- Install and start `redis` for persistent sessions
|
||||
- Start RTMPDash, example systemd unit below
|
||||
|
||||
## Further setup
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="linq2db" Version="3.2.3" />
|
||||
<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" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -22,8 +22,17 @@ namespace RTMPDash {
|
|||
|
||||
#if (DEBUG)
|
||||
services.AddControllers().AddRazorRuntimeCompilation();
|
||||
services.AddStackExchangeRedisCache(options => {
|
||||
options.Configuration = "localhost";
|
||||
options.InstanceName = "RTMPdash_development";
|
||||
});
|
||||
#else
|
||||
services.AddControllers();
|
||||
services.AddStackExchangeRedisCache(options =>
|
||||
{
|
||||
options.Configuration = "localhost";
|
||||
options.InstanceName = "RTMPdash_production";
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue