Skip to content

Instantly share code, notes, and snippets.

@khalidx
Created September 25, 2023 05:29
Show Gist options
  • Save khalidx/c8a045cf4ec457f72d0729ebd2ba5151 to your computer and use it in GitHub Desktop.
Save khalidx/c8a045cf4ec457f72d0729ebd2ba5151 to your computer and use it in GitHub Desktop.
Redis configuration settings.

Here are some configuration settings for setting up Redis.

This should go in your docker-compose.yaml:

redis:
    image: redis/redis-stack-server:7.2.0-v2
    restart: always
    volumes:
      - redis-data:/data
      - ./config/redis-stack.conf:/redis-stack.conf:ro

And this should go in a file relative to the one above, at ./config/redis-stack.conf:

bind 127.0.0.1
port 6379
protected-mode yes
requirepass "some-admin-password"
timeout 60
loglevel notice
databases 1
maxclients 100
appendonly yes
appendfsync always

Make sure you set requirepass to some strong password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment