feat: update Guidelines
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user