feat: update Guidelines
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
x-default: &default
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- &localtime /etc/localtime:/etc/localtime:ro
|
||||
- &timezone /etc/timezone:/etc/timezone:ro
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 100m
|
||||
max-file: "3"
|
||||
|
||||
services:
|
||||
redis-cluster-init:
|
||||
image: redis:${REDIS_VERSION:-8.2.1-alpine}
|
||||
container_name: redis-cluster-init
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
command: >
|
||||
sh -c "
|
||||
echo 'Waiting for all Redis instances to start...' &&
|
||||
@@ -22,116 +21,170 @@ services:
|
||||
--cluster-replicas 1 --cluster-yes
|
||||
"
|
||||
depends_on:
|
||||
- redis-1
|
||||
- redis-2
|
||||
- redis-3
|
||||
- redis-4
|
||||
- redis-5
|
||||
- redis-6
|
||||
redis-1:
|
||||
condition: service_healthy
|
||||
redis-2:
|
||||
condition: service_healthy
|
||||
redis-3:
|
||||
condition: service_healthy
|
||||
redis-4:
|
||||
condition: service_healthy
|
||||
redis-5:
|
||||
condition: service_healthy
|
||||
redis-6:
|
||||
condition: service_healthy
|
||||
profiles:
|
||||
- init
|
||||
|
||||
redis-1:
|
||||
<<: *default
|
||||
image: redis:${REDIS_VERSION:-8.2.1-alpine}
|
||||
container_name: redis-1
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
command: redis-server --port 6379 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
|
||||
ports:
|
||||
- "7000:6379"
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- redis_1_data:/data
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
|
||||
redis-2:
|
||||
<<: *default
|
||||
image: redis:${REDIS_VERSION:-8.2.1-alpine}
|
||||
container_name: redis-2
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
command: redis-server --port 6379 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
|
||||
ports:
|
||||
- "7001:6379"
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- redis_2_data:/data
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
|
||||
redis-3:
|
||||
<<: *default
|
||||
image: redis:${REDIS_VERSION:-8.2.1-alpine}
|
||||
container_name: redis-3
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
command: redis-server --port 6379 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
|
||||
ports:
|
||||
- "7002:6379"
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- redis_3_data:/data
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
|
||||
redis-4:
|
||||
<<: *default
|
||||
image: redis:${REDIS_VERSION:-8.2.1-alpine}
|
||||
container_name: redis-4
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
command: redis-server --port 6379 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
|
||||
ports:
|
||||
- "7003:6379"
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- redis_4_data:/data
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
|
||||
redis-5:
|
||||
<<: *default
|
||||
image: redis:${REDIS_VERSION:-8.2.1-alpine}
|
||||
container_name: redis-5
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
command: redis-server --port 6379 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
|
||||
ports:
|
||||
- "7004:6379"
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- redis_5_data:/data
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
|
||||
redis-6:
|
||||
<<: *default
|
||||
image: redis:${REDIS_VERSION:-8.2.1-alpine}
|
||||
container_name: redis-6
|
||||
environment:
|
||||
- TZ=${TZ:-UTC}
|
||||
command: redis-server --port 6379 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes
|
||||
ports:
|
||||
- "7005:6379"
|
||||
volumes:
|
||||
- *localtime
|
||||
- *timezone
|
||||
- redis_6_data:/data
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
|
||||
volumes:
|
||||
redis_1_data:
|
||||
|
||||
Reference in New Issue
Block a user