ember-cli-deploy / ember-cli-deploy/ember-cli-deploy-redis
Simple redis url does not work
- 主要语言
- JavaScript
- 星标
- 17
- 派生
- 40
- PR 合并指标
- 30 天内没有已合并 PR
描述
Running a js app inside a container,
In `deploy.js` I have the following simple config
```
ENV.redis = {
url: process.env['REDIS_URL']
}
```
The url in the env is `REDIS_URL=redis://redis:6379/0`
Apparently it will fail to parse as it will still try to connect to localhost (the default host).
To work around it I need to do the parsing myself:
```js
const { URL } = require('url');
const redisURL = new URL(process.env['REDIS_URL'])
ENV.redis = {
host: redisURL.hostname,
port: redisURL.port,
username: redisURL.username,
password: redisURL.password
};
```
It will be ideal to have the parsing done by this library.
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先追踪当 URL 设置为 redis://redis:6379/0 时,deploy.js 中的 Redis 配置是如何被使用的。复现容器配置,并检查库是否使用 URL 中的主机,而不是其 localhost 默认值。完成的标准是:简单 URL 能够连接到配置的 Redis 主机,而不需要调用方自行解析它。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, redis
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100