# Host-side ports for the single-node services can be overridden via the # REDIX_*_PORT environment variables (e.g. REDIX_BASE_PORT=6479 docker compose up). # The container-side ports are intentionally NOT parameterized — Redix tests pick up # the same env vars (see test/support/test_ports.ex), so changing the host-side mapping # is enough. # # The sentinel and cluster services bake their port numbers into their internal # topology (sentinel.conf references `localhost 6381`; `CLUSTER MEET` uses # 127.0.0.1:7000..7008). Remapping their host-side ports would break client # redirection. They are left as fixed mappings on purpose. services: base: image: "redis:alpine" ports: - "${REDIX_BASE_PORT:-6379}:6379" sysctls: net.core.somaxconn: 1024 pubsub: image: "redis:alpine" ports: - "${REDIX_PUBSUB_PORT:-6380}:6379" sysctls: net.core.somaxconn: 1024 base_with_auth: image: "redis:5-alpine" command: redis-server --requirepass some-password ports: - "${REDIX_AUTH_PORT:-16379}:6379" sysctls: net.core.somaxconn: 1024 base_with_acl: build: ./test/docker/base_with_acl ports: - "${REDIX_ACL_PORT:-6385}:6379" sysctls: net.core.somaxconn: 1024 sentinel: build: ./test/docker/sentinel ports: - "6381:6381" - "6382:6382" - "26379:26379" - "26380:26380" - "26381:26381" sysctls: net.core.somaxconn: 1024 sentinel_with_auth: build: ./test/docker/sentinel_with_auth ports: - "6383:6383" - "26383:26383" sysctls: net.core.somaxconn: 1024 base_with_stunnel: image: dweomer/stunnel@sha256:2d8fc61859475e7fef470c8a45219acea5b636c284339d811873819e532209e7 environment: - STUNNEL_SERVICE=base - STUNNEL_ACCEPT=6384 - STUNNEL_CONNECT=base:6379 links: - base ports: - "${REDIX_STUNNEL_PORT:-6384}:6384" sysctls: net.core.somaxconn: 1024 base_with_disallowed_client_command: build: ./test/docker/base_with_disallowed_client_command ports: - "${REDIX_DISALLOWED_CLIENT_PORT:-6386}:6379" sysctls: net.core.somaxconn: 1024 cluster: build: ./test/docker/cluster ports: - "7000:7000" - "7001:7001" - "7002:7002" - "7003:7003" - "7004:7004" - "7005:7005" - "7006:7006" - "7007:7007" - "7008:7008" sysctls: net.core.somaxconn: 1024