Skip to content

PaddySe/PaddySe.RedisTest

Repository files navigation

Redis test

This is a test project for Redis, in .net 10 and C#. It includes a Docker Compose file to set up a Redis instance with a specified password and data persistence.

Yes, there is a password in the files. No, it is not a password I use outside of this test project.

Docker Compose

The docker-compose.yaml file sets up a Redis instance with the following configuration:

  • Image: redis:latest
  • Container name: redis-test
  • Ports: 6379:6379
  • Command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
  • Volumes: .\redis-data:/data (for data persistence)

.gitignore

The .gitignore file includes the following entries:

  • redis-data/ (to ignore the Redis data directory)

Usage

To run the Redis instance, use the following command in the terminal:

docker-compose up -d

This will start the Redis container in detached mode. You can then connect to it using the specified password.

To stop the Redis instance, use:

docker-compose down

Make sure to replace the password in the command with your own secure password if you plan to use this setup for anything beyond testing.

Running the .NET Application

I trust you know how to run a .NET application, but if you need a reminder, you can use the following command in the terminal:

dotnet run --project .\PaddySe.RedisTest.Web\PaddySe.RedisTest.Web.csproj

You can then navigate to http://localhost:5000 in your web browser to see the application in action. The application will connect to the Redis instance and perform some basic operations to demonstrate its functionality.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors