main:完善 Redis 密码配置支持
- 在函数计算配置文件中新增 `redis_password` 字段。 - 更新 API 和 Worker 环境变量以传递 Redis 密码。 - 提升服务安全性,支持连接受保护的 Redis 实例。
This commit is contained in:
@@ -9,6 +9,7 @@ vars:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/your-namespace/functional-scaffold:latest
|
||||
redis_host: r-xxxxx.redis.rds.aliyuncs.com
|
||||
redis_port: "6379"
|
||||
redis_password: "your-password"
|
||||
|
||||
resources:
|
||||
# API 服务函数
|
||||
@@ -44,6 +45,7 @@ resources:
|
||||
RUN_MODE: api
|
||||
REDIS_HOST: ${vars.redis_host}
|
||||
REDIS_PORT: ${vars.redis_port}
|
||||
REDIS_PASSWORD: ${vars.redis_password}
|
||||
vpcConfig: auto
|
||||
logConfig: auto
|
||||
triggers:
|
||||
@@ -83,6 +85,7 @@ resources:
|
||||
RUN_MODE: worker
|
||||
REDIS_HOST: ${vars.redis_host}
|
||||
REDIS_PORT: ${vars.redis_port}
|
||||
REDIS_PASSWORD: ${vars.redis_password}
|
||||
WORKER_POLL_INTERVAL: "1.0"
|
||||
MAX_CONCURRENT_JOBS: "5"
|
||||
JOB_MAX_RETRIES: "3"
|
||||
|
||||
Reference in New Issue
Block a user