From 7a7fa577fa67706e15793d49a6d89c9f2a83c600 Mon Sep 17 00:00:00 2001 From: huangzhenpc Date: Thu, 15 Jan 2026 21:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddocker-compose.yml:=20?= =?UTF-8?q?=E5=AE=8C=E5=85=A8=E6=B3=A8=E9=87=8ARedis=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E8=AF=AD=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/docker-compose.yml | 55 ++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 32 deletions(-) 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