ember-cli-deploy / ember-cli-deploy/ember-cli-deploy-redis

Simple redis url does not work

Đang mở
#103 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
17
Fork
40
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.