ember-cli-deploy-redis
raw JSON → 4.0.0 verified Sat Apr 25 auth: no javascript
An Ember CLI Deploy plugin that uploads a file (typically index.html) to a Redis store. v4.0.0, released 2024-08-28, stable. Part of the ember-cli-deploy ecosystem, commonly used with S3 for lightning deployments. Supports Node 14+ and Rediss URLs. Compared to alternatives, it integrates tightly with ember-cli-deploy hooks and configuration.
Common errors
error TypeError: Cannot read property 'name' of undefined ↓
cause Deployment context missing project.name(), often in non-EmberCLI usage.
fix
Ensure the plugin runs within an ember-cli-deploy context, or provide keyPrefix manually.
error ReplyError: WRONGPASS invalid username-password pair ↓
cause Redis authentication failed.
fix
Check password configuration in deploy.js or environment variable.
error Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED ↓
cause Redis server not running on the specified host/port.
fix
Start Redis server or update host/port configuration.
Warnings
breaking v4.0.0 drops support for Node versions below 14 and updates dependencies, potentially breaking existing configurations. ↓
fix Update Node to >=14 and ensure ember-cli-deploy is compatible.
breaking v3.0.0 dropped support for Node < 12. ↓
fix Upgrade Node to >=12.
breaking v2.0.0 dropped support for Node < 10. ↓
fix Upgrade Node to >=10.
gotcha The plugin uploads only one file by default (filePattern: 'index.html'). If you need to upload multiple files, you must configure multiple plugins or a custom adapter. ↓
fix Set filePattern to a glob pattern (not supported by default) or use separate plugin instances.
gotcha Using url with rediss:// protocol requires TLS support; ensure redis library v3+ is installed. ↓
fix Use 'rediss://' URL format and set redisOptions.tls if needed.
Install
npm install ember-cli-deploy-redis yarn add ember-cli-deploy-redis pnpm add ember-cli-deploy-redis Imports
- default wrong
const redisDeployPlugin = require('ember-cli-deploy-redis')correctimport redisDeployPlugin from 'ember-cli-deploy-redis' - EmberAddon config wrong
ENV['ember-cli-deploy-redis'] = {}correctENV.redis = { host: 'localhost', port: 6379 } - object config wrong
new RedisPlugin(config)correctconst config = { host: 'localhost', port: 6379 }
Quickstart
// config/deploy.js
module.exports = function(deployTarget) {
let ENV = {
build: {},
redis: {
host: process.env.REDIS_HOST || 'localhost',
port: process.env.REDIS_PORT || 6379,
password: process.env.REDIS_PASSWORD || '',
},
};
if (deployTarget === 'production') {
ENV.redis.host = process.env.REDIS_HOST_PROD;
}
return ENV;
};