Skip to main content

Redis Setup

The importance of Redis to the application, especially in scenarios such as caching webhook information and data from available integrations, is significant. Redis, being an in-memory data store, offers high speed and efficiency for read and write operations, which increases code performance by reducing the need for frequent accesses to the traditional database.

Redis Installation Guide

1. Update the System:

sudo apt update
sudo apt upgrade

2. Install Redis:

sudo apt install redis-server

3. Initial setting:

  • Edit the Redis configuration file (redis.conf), usually located in /etc/redis/.
  • Modify the supervised directive for systemd.
  • Save and close the file.

4. Restart the Redis Service:

sudo systemctl restart redis.service

6. Test the Installation:

  • Connect to the Redis server using the CLI:
    sudo systemctl status redis
  • At the Redis prompt, test with a simple command like ping. If everything is configured correctly, you should receive a PONG response.

Redis Docker Compose

version: '3'
image: redis:alpine
restart: always
command: ["sh", "-c", "redis-server --requirepass \"$REDIS_PASSWORD\""]
volumes:
- /data/redis:/data
ports:
- '127.0.0.1:6379:6379'
  1. Create a docker-compose.yml file with the above content.
  2. Run Docker Compose:
docker compose up -d
  1. Connect to Redis using a Redis client, specifying the host as localhost and port 6379