恢复Redis服务配置,使用兼容的command语法
This commit is contained in:
@@ -160,29 +160,40 @@ services:
|
|||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# Redis Cache (DISABLED - Using external Redis at 172.18.0.2:6379)
|
# Redis Cache (DISABLED - Using external Redis at 172.18.0.2:6379)
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# To use built-in Redis instead, uncomment the service below and update REDIS_HOST to "redis"
|
# Built-in Redis is available but not used by default
|
||||||
|
# The application connects to external Redis at 172.18.0.2:6379
|
||||||
# redis:
|
redis:
|
||||||
# image: redis:8-alpine
|
profiles:
|
||||||
# container_name: sub2api-redis
|
- disabled
|
||||||
# restart: unless-stopped
|
image: redis:8-alpine
|
||||||
# ulimits:
|
container_name: sub2api-redis
|
||||||
# nofile:
|
restart: unless-stopped
|
||||||
# soft: 100000
|
ulimits:
|
||||||
# hard: 100000
|
nofile:
|
||||||
# volumes:
|
soft: 100000
|
||||||
# - redis_data:/data
|
hard: 100000
|
||||||
# command: redis-server --save 60 1 --appendonly yes --appendfsync everysec
|
volumes:
|
||||||
# environment:
|
- redis_data:/data
|
||||||
# - TZ=${TZ:-Asia/Shanghai}
|
command:
|
||||||
# networks:
|
- sh
|
||||||
# - sub2api-network
|
- -c
|
||||||
# healthcheck:
|
- |
|
||||||
# test: ["CMD", "redis-cli", "ping"]
|
redis-server \
|
||||||
# interval: 10s
|
--save 60 1 \
|
||||||
# timeout: 5s
|
--appendonly yes \
|
||||||
# retries: 5
|
--appendfsync everysec \
|
||||||
# start_period: 5s
|
$${REDIS_PASSWORD:+--requirepass "$$REDIS_PASSWORD"}
|
||||||
|
environment:
|
||||||
|
- TZ=$${TZ:-Asia/Shanghai}
|
||||||
|
- REDISCLI_AUTH=$${REDIS_PASSWORD:-}
|
||||||
|
networks:
|
||||||
|
- sub2api-network
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 5s
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Volumes
|
# Volumes
|
||||||
|
|||||||
Reference in New Issue
Block a user