Skip to content

Commit

Permalink
fix: use railway env name (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanguoyu authored Aug 8, 2023
1 parent 6eab7fc commit 5ffd454
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions packages/samples/mvp-dapp/kuai.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,27 @@ if (process.env.REDIS_OPT) {
}
}

// fallback to REDISUSER due to https://github.com/ckb-js/kuai/pull/423#issuecomment-1668983983
const REDIS_USER = redisOpt?.username ?? process.env.REDUSUSER
const REDIS_PASSWORD = redisOpt?.password ?? process.env.REDISPASSWORD
const REDIS_HOST = process.env.REDIS_HOST ?? process.env.REDISHOST
const REDIS_PORT = process.env.REDIS_PORT ?? process.env.REDISPORT

const redisAuth = REDIS_USER && REDIS_PASSWORD ? { username: REDIS_USER, password: REDIS_PASSWORD } : undefined

module.exports = {
host: process.env.HOST,
port: process.env.PORT,
network: 'testnet',
redisPort: process.env.REDIS_PORT,
redisHost: process.env.REDIS_HOST,
redisOpt,
redisPort: REDIS_PORT,
redisHost: REDIS_HOST,
redisOpt:
redisOpt || redisAuth
? {
...redisOpt,
...redisAuth,
}
: undefined,
jest: {
preset: 'ts-jest',
testEnvironment: 'node',
Expand Down

0 comments on commit 5ffd454

Please sign in to comment.