Create Redis cluster + Docker + .Net Core 3.1 API for distributed caching

redis cluster .net core with docker project template

Part 1. Setup redis in docker

Part 2. Create .net core app & configure it in docker

Install-Package ServiceStack.Redis -Version 5.9.2
"Redis": [ "localhost:6379", "localhost:6380", "localhost:6381", "localhost:6382" ],
dotnet dev-certs https -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p password
dotnet dev-certs https --clean

Part 3. Run

docker-compose --compatibility up --build

Part 4. Project template

dotnet new -i Superwalnut.RedisClusterTemplate
dotnet new -l templates
dotnet new redis-dotnet-core -n <project-name> -o <project-folder>

Finally,

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store