修复docker-compose.yml: 完全注释Redis服务避免语法错误
This commit is contained in:
@@ -160,38 +160,29 @@ 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)
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# Uncomment below if you want to use the built-in Redis instead of external
|
# To use built-in Redis instead, uncomment the service below and update REDIS_HOST to "redis"
|
||||||
redis:
|
|
||||||
profiles:
|
# redis:
|
||||||
- disabled
|
# image: redis:8-alpine
|
||||||
image: redis:8-alpine
|
# container_name: sub2api-redis
|
||||||
container_name: sub2api-redis
|
# restart: unless-stopped
|
||||||
restart: unless-stopped
|
# ulimits:
|
||||||
ulimits:
|
# nofile:
|
||||||
nofile:
|
# soft: 100000
|
||||||
soft: 100000
|
# hard: 100000
|
||||||
hard: 100000
|
# volumes:
|
||||||
volumes:
|
# - redis_data:/data
|
||||||
- redis_data:/data
|
# command: redis-server --save 60 1 --appendonly yes --appendfsync everysec
|
||||||
command: >
|
# environment:
|
||||||
sh -c '
|
# - TZ=${TZ:-Asia/Shanghai}
|
||||||
redis-server
|
# networks:
|
||||||
--save 60 1
|
# - sub2api-network
|
||||||
--appendonly yes
|
# healthcheck:
|
||||||
--appendfsync everysec
|
# test: ["CMD", "redis-cli", "ping"]
|
||||||
${REDIS_PASSWORD:+--requirepass "$REDIS_PASSWORD"}'
|
# interval: 10s
|
||||||
environment:
|
# timeout: 5s
|
||||||
- TZ=${TZ:-Asia/Shanghai}
|
# retries: 5
|
||||||
# REDISCLI_AUTH is used by redis-cli for authentication (safer than -a flag)
|
# start_period: 5s
|
||||||
- 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