Skip to content

Instantly share code, notes, and snippets.

@Graeme22
Last active February 13, 2026 20:11
Show Gist options
  • Select an option

  • Save Graeme22/d2745077ad62a08e3fcf5f71c6b5b431 to your computer and use it in GitHub Desktop.

Select an option

Save Graeme22/d2745077ad62a08e3fcf5f71c6b5b431 to your computer and use it in GitHub Desktop.
Docker Compose override to allow using streaQ's compose configuration locally
services:
redis-master:
ports:
- "6380:6379"
slave-1:
ports:
- "6381:6379"
slave-2:
ports:
- "6382:6379"
sentinel-1:
ports:
- "26379:26379"
sentinel-2:
ports:
- "26380:26379"
sentinel-3:
ports:
- "26381:26379"
cluster-1:
command: redis-server --port 7000 --cluster-enabled yes --appendonly yes --protected-mode no --cluster-announce-ip ${HOST_IP} --cluster-announce-port 7000
ports:
- "7000:7000"
- "17000:17000"
cluster-2:
command: redis-server --port 7001 --cluster-enabled yes --appendonly yes --protected-mode no --cluster-announce-ip ${HOST_IP} --cluster-announce-port 7001
ports:
- "7001:7001"
- "17001:17001"
cluster-3:
command: redis-server --port 7002 --cluster-enabled yes --appendonly yes --protected-mode no --cluster-announce-ip ${HOST_IP} --cluster-announce-port 7002
ports:
- "7002:7002"
- "17002:17002"
cluster-4:
command: redis-server --port 7003 --cluster-enabled yes --appendonly yes --protected-mode no --cluster-announce-ip ${HOST_IP} --cluster-announce-port 7003
ports:
- "7003:7003"
- "17003:17003"
cluster-5:
command: redis-server --port 7004 --cluster-enabled yes --appendonly yes --protected-mode no --cluster-announce-ip ${HOST_IP} --cluster-announce-port 7004
ports:
- "7004:7004"
- "17004:17004"
cluster-6:
command: redis-server --port 7005 --cluster-enabled yes --appendonly yes --protected-mode no --cluster-announce-ip ${HOST_IP} --cluster-announce-port 7005
ports:
- "7005:7005"
- "17005:17005"
@Graeme22
Copy link
Author

Instructions:

  1. Clone https://github.com/tastyware/streaq.
  2. Add this file to the repo directory.

That's it! You can now easily run sentinel or cluster locally:

$ docker-compose up sentinel-init

On macOS you'll likely need to do some additional setup to connect to Docker containers running on your local network. This .env file helps configure container networking:

HOST_IP=host.docker.internal
HOST_OS=Darwin

Together with a hosts entry:

$ echo "127.0.0.1 host.docker.internal" >> /etc/hosts

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