feat: update Guidelines

This commit is contained in:
Sun-ZhenXing
2025-10-15 14:00:03 +08:00
parent fe329c80eb
commit 8cf227bd14
76 changed files with 1078 additions and 671 deletions

View File

@@ -1,11 +1,11 @@
# App version
REDIS_VERSION="8.2.1-alpine3.22"
# Redis version
REDIS_VERSION=8.2.1-alpine3.22
# Skip fixing permissions, set to 1 to skip
SKIP_FIX_PERMS=1
# Password for the default "default" user
REDIS_PASSWORD="passw0rd"
# Password for Redis authentication (leave empty for no password)
REDIS_PASSWORD=passw0rd
# Port to bind to on the host machine
REDIS_PORT_OVERRIDE=6379
# Timezone (e.g., UTC, Asia/Shanghai, America/New_York)
TZ=UTC

View File

@@ -1,28 +1,24 @@
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:
<<: *default
image: redis:${REDIS_VERSION:-8.2.1-alpine3.22}
container_name: redis
ports:
- "${REDIS_PORT_OVERRIDE:-6379}:6379"
volumes:
- *localtime
- *timezone
- redis_data:/data
# Use a custom redis.conf file
# - ./redis.conf:/etc/redis/redis.conf
environment:
- TZ=${TZ:-UTC}
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
- SKIP_FIX_PERMS=${SKIP_FIX_PERMS:-}
command:
- sh
@@ -33,6 +29,12 @@ services:
else
redis-server
fi
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
start_period: 5s
deploy:
resources:
limits: