chore: add missing READMEs
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
# Global registry prefix for all images (optional)
|
||||
GLOBAL_REGISTRY=
|
||||
|
||||
# Redis version
|
||||
REDIS_VERSION=8.2.1-alpine3.22
|
||||
|
||||
# Password for Redis authentication (leave empty for no password)
|
||||
REDIS_PASSWORD=passw0rd
|
||||
REDIS_PASSWORD=
|
||||
|
||||
# Port to bind to on the host machine
|
||||
REDIS_PORT_OVERRIDE=6379
|
||||
|
||||
# Timezone (e.g., UTC, Asia/Shanghai, America/New_York)
|
||||
TZ=UTC
|
||||
|
||||
# Skip permission fixing (set to 1 to skip)
|
||||
SKIP_FIX_PERMS=
|
||||
|
||||
# CPU limits
|
||||
REDIS_CPU_LIMIT=0.50
|
||||
REDIS_CPU_RESERVATION=0.25
|
||||
|
||||
# Memory limits
|
||||
REDIS_MEMORY_LIMIT=256M
|
||||
REDIS_MEMORY_RESERVATION=128M
|
||||
|
||||
@@ -2,24 +2,60 @@
|
||||
|
||||
[English](./README.md) | [中文](./README.zh.md)
|
||||
|
||||
This service deploys Redis, an in-memory key-value store for caching and message brokering.
|
||||
This service deploys Redis, a high-performance in-memory key-value store for caching, session management, and message brokering.
|
||||
|
||||
## Services
|
||||
|
||||
- `redis`: The Redis service.
|
||||
- `redis`: The Redis service (port 6379)
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
| Variable Name | Description | Default Value |
|
||||
| ------------------- | -------------------------------------------------------- | ------------------ |
|
||||
| REDIS_VERSION | Redis image version | `8.2.1-alpine3.22` |
|
||||
| SKIP_FIX_PERMS | Skip permission fixing, set to 1 to skip | `""` |
|
||||
| REDIS_PASSWORD | Password for the default "default" user | `""` |
|
||||
| REDIS_PORT_OVERRIDE | Host port mapping (maps to Redis port 6379 in container) | 6379 |
|
||||
| Variable Name | Description | Default Value |
|
||||
| -------------------------- | -------------------------------------------------------- | ------------------ |
|
||||
| `GLOBAL_REGISTRY` | Global registry prefix for all images | `""` |
|
||||
| `REDIS_VERSION` | Redis image version | `8.2.1-alpine3.22` |
|
||||
| `REDIS_PASSWORD` | Password for Redis authentication (empty = no auth) | `""` |
|
||||
| `REDIS_PORT_OVERRIDE` | Host port mapping (maps to Redis port 6379 in container) | `6379` |
|
||||
| `TZ` | Timezone | `UTC` |
|
||||
| `SKIP_FIX_PERMS` | Skip permission fixing (set to 1 to skip) | `""` |
|
||||
| `REDIS_CPU_LIMIT` | CPU limit | `0.50` |
|
||||
| `REDIS_CPU_RESERVATION` | CPU reservation | `0.25` |
|
||||
| `REDIS_MEMORY_LIMIT` | Memory limit | `256M` |
|
||||
| `REDIS_MEMORY_RESERVATION` | Memory reservation | `128M` |
|
||||
|
||||
Please modify the `.env` file as needed for your use case.
|
||||
|
||||
## Volumes
|
||||
|
||||
- `redis_data`: A volume for storing Redis data.
|
||||
- `redis.conf`: Optional custom configuration file (mount to `/etc/redis/redis.conf`).
|
||||
- `redis_data`: A named volume for storing Redis data files
|
||||
|
||||
## Custom Configuration
|
||||
|
||||
To use a custom `redis.conf` file, uncomment the volume mount in `docker-compose.yaml`:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- ./redis.conf:/etc/redis/redis.conf
|
||||
```
|
||||
|
||||
Then modify the `command` section to use the custom config:
|
||||
|
||||
```yaml
|
||||
command: redis-server /etc/redis/redis.conf
|
||||
```
|
||||
|
||||
## Security Notes
|
||||
|
||||
- By default, Redis runs without authentication. Set `REDIS_PASSWORD` to enable authentication.
|
||||
- Redis runs as the default user in the official image.
|
||||
- Consider using TLS/SSL for production deployments.
|
||||
|
||||
## License
|
||||
|
||||
Redis is open source and licensed under the [BSD 3-Clause License](https://redis.io/docs/about/license/).
|
||||
|
||||
@@ -2,24 +2,60 @@
|
||||
|
||||
[English](./README.md) | [中文](./README.zh.md)
|
||||
|
||||
此服务用于部署 Redis,一个用于缓存和消息队列的内存键值数据库。
|
||||
此服务用于部署 Redis,一个高性能的内存键值存储,用于缓存、会话管理和消息队列。
|
||||
|
||||
## 服务
|
||||
|
||||
- `redis`: Redis 服务。
|
||||
- `redis`:Redis 服务(端口 6379)
|
||||
|
||||
## 快速开始
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## 环境变量
|
||||
|
||||
| 变量名 | 说明 | 默认值 |
|
||||
| ------------------- | -------------------------------------------- | ------------------ |
|
||||
| REDIS_VERSION | Redis 镜像版本 | `8.2.1-alpine3.22` |
|
||||
| SKIP_FIX_PERMS | 跳过权限修复,设置为 1 跳过 | `""` |
|
||||
| REDIS_PASSWORD | 默认 "default" 用户的密码 | `""` |
|
||||
| REDIS_PORT_OVERRIDE | 主机端口映射(映射到容器内 Redis 端口 6379) | 6379 |
|
||||
| 变量名 | 说明 | 默认值 |
|
||||
| -------------------------- | -------------------------------------------- | ------------------ |
|
||||
| `GLOBAL_REGISTRY` | 全局镜像仓库前缀 | `""` |
|
||||
| `REDIS_VERSION` | Redis 镜像版本 | `8.2.1-alpine3.22` |
|
||||
| `REDIS_PASSWORD` | Redis 认证密码(留空表示不启用认证) | `""` |
|
||||
| `REDIS_PORT_OVERRIDE` | 主机端口映射(映射到容器内 Redis 端口 6379) | `6379` |
|
||||
| `TZ` | 时区 | `UTC` |
|
||||
| `SKIP_FIX_PERMS` | 跳过权限修复(设置为 1 跳过) | `""` |
|
||||
| `REDIS_CPU_LIMIT` | CPU 限制 | `0.50` |
|
||||
| `REDIS_CPU_RESERVATION` | CPU 预留 | `0.25` |
|
||||
| `REDIS_MEMORY_LIMIT` | 内存限制 | `256M` |
|
||||
| `REDIS_MEMORY_RESERVATION` | 内存预留 | `128M` |
|
||||
|
||||
请根据实际需求修改 `.env` 文件。
|
||||
|
||||
## 卷
|
||||
|
||||
- `redis_data`: 用于存储 Redis 数据的卷。
|
||||
- `redis.conf`: 可选的自定义配置文件(挂载到 `/etc/redis/redis.conf`)。
|
||||
- `redis_data`:用于存储 Redis 数据文件的命名卷
|
||||
|
||||
## 自定义配置
|
||||
|
||||
如需使用自定义的 `redis.conf` 文件,请在 `docker-compose.yaml` 中取消注释卷挂载:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- ./redis.conf:/etc/redis/redis.conf
|
||||
```
|
||||
|
||||
然后修改 `command` 部分以使用自定义配置:
|
||||
|
||||
```yaml
|
||||
command: redis-server /etc/redis/redis.conf
|
||||
```
|
||||
|
||||
## 安全提示
|
||||
|
||||
- 默认情况下,Redis 不启用认证。请设置 `REDIS_PASSWORD` 以启用认证。
|
||||
- Redis 使用官方镜像中的默认用户运行。
|
||||
- 生产环境部署建议使用 TLS/SSL。
|
||||
|
||||
## 许可证
|
||||
|
||||
Redis 是开源软件,采用 [BSD 3-Clause License](https://redis.io/docs/about/license/) 许可。
|
||||
|
||||
@@ -38,11 +38,11 @@ services:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.50'
|
||||
memory: 512M
|
||||
cpus: ${REDIS_CPU_LIMIT:-0.50}
|
||||
memory: ${REDIS_MEMORY_LIMIT:-256M}
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
cpus: ${REDIS_CPU_RESERVATION:-0.25}
|
||||
memory: ${REDIS_MEMORY_RESERVATION:-128M}
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
|
||||
Reference in New Issue
Block a user