build: add sentinel topology to dev compose stack
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
2bd3d0a18e
commit
8d1093cd2d
4 files changed
+42
-2
No files matched your search
@@ -22,5 +22,33 @@ services:
|
||||
interval: 2s
|
||||
retries: 30
|
||||
|
||||
# Sentinel topology for HA testing: docker compose --profile sentinel up -d
|
||||
# Host networking keeps announced addresses reachable from the host.
|
||||
redis-primary:
|
||||
image: redis:8-alpine
|
||||
profiles: [sentinel]
|
||||
network_mode: host
|
||||
command: redis-server --port 6380
|
||||
|
||||
redis-replica:
|
||||
image: redis:8-alpine
|
||||
profiles: [sentinel]
|
||||
network_mode: host
|
||||
command: redis-server --port 6381 --replicaof 127.0.0.1 6380
|
||||
|
||||
sentinel-1: &sentinel
|
||||
image: redis:8-alpine
|
||||
profiles: [sentinel]
|
||||
network_mode: host
|
||||
entrypoint: ["sh", "-c", "cp /cfg/sentinel.conf /tmp/s.conf && exec redis-sentinel /tmp/s.conf --port $$PORT"]
|
||||
environment: {PORT: "26379"}
|
||||
volumes: [./deploy/dev/sentinel.conf:/cfg/sentinel.conf:ro]
|
||||
sentinel-2:
|
||||
<<: *sentinel
|
||||
environment: {PORT: "26380"}
|
||||
sentinel-3:
|
||||
<<: *sentinel
|
||||
environment: {PORT: "26381"}
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
Reference in new issue
Block a user