diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index cefd0f4a..adc1ce17 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -160,38 +160,29 @@ services: # =========================================================================== # 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 - redis: - profiles: - - disabled - image: redis:8-alpine - container_name: sub2api-redis - restart: unless-stopped - ulimits: - nofile: - soft: 100000 - hard: 100000 - volumes: - - redis_data:/data - command: > - sh -c ' - redis-server - --save 60 1 - --appendonly yes - --appendfsync everysec - ${REDIS_PASSWORD:+--requirepass "$REDIS_PASSWORD"}' - environment: - - TZ=${TZ:-Asia/Shanghai} - # REDISCLI_AUTH is used by redis-cli for authentication (safer than -a flag) - - REDISCLI_AUTH=${REDIS_PASSWORD:-} - networks: - - sub2api-network - healthcheck: - test: ["CMD", "redis-cli", "ping"] - interval: 10s - timeout: 5s - retries: 5 - start_period: 5s + # To use built-in Redis instead, uncomment the service below and update REDIS_HOST to "redis" + + # redis: + # image: redis:8-alpine + # container_name: sub2api-redis + # restart: unless-stopped + # ulimits: + # nofile: + # soft: 100000 + # hard: 100000 + # volumes: + # - redis_data:/data + # command: redis-server --save 60 1 --appendonly yes --appendfsync everysec + # environment: + # - TZ=${TZ:-Asia/Shanghai} + # networks: + # - sub2api-network + # healthcheck: + # test: ["CMD", "redis-cli", "ping"] + # interval: 10s + # timeout: 5s + # retries: 5 + # start_period: 5s # ============================================================================= # Volumes