Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 2.54 KB

README.md

File metadata and controls

74 lines (56 loc) · 2.54 KB

Ember-deploy-redis Build Status


**WARNING: This plugin is only compatible with ember-cli-deploy versions < 0.5.0 and deprecated in favor of [ember-cli-deploy-redis](https://github.com/ember-cli-deploy/ember-cli-deploy-redis). Please consider upgrading to an up to date version of [ember-cli-deploy](https://github.com/ember-cli/ember-cli-deploy) when using in production**

This is the redis-adapter implementation to use Redis with ember-deploy.

Securely deploying your app

If your redis instance is isolated in a local intranet for security purposes, there is an option to open a SSH tunnel to the redis instance. To configure your ssh tunnel, provide the configuration in your environment.

Deploying to a local machine

module.exports = {
  development: {
    buildEnv: 'production',
    store: {
      type: 'redis',
      host: '10.12.0.0',
      port: 6379
    }
  }
};

Deploying to external machine (reachable through ssh)

The ssh object will pass directly to tunnel-ssh so you can add any options to configure the tunnel destination host (dstHost) and port (dstPort), useful for instances where the default localhost isn't where your redis lives.

module.exports = {
  development: {
    buildEnv: 'production',
    store: {
      type: 'redis',
      ssh: {
        host: 'ember-deploy-redis.com',
        username: 'deploy',
        privateKey: '~/.ssh/id_rsa',
        dstPort: 6379, // redis port
        dstHost: 'localhost' // redis host
      }
    }
  }
};

Note that the privateKey is a path to the SSH private key to access the machine that your redis instance is on, not a full blown key.

Deploying with a redis URL (for hosted redis, like Heroku)

If you're using a hosted solution Heroku Redis, RedisToGo, etc., you can add the URL directly as a string for the store option.

module.exports = {
  development: {
    store: "redis://:password@hostname:port"
  }
}

TIP

Redis doesn't have a concept of usernames. If your redis URL contains a username it is simply a placeholder. Remove the username, leaving the colon separator like this:

redis://username:password@hostname:port

becomes

redis://:password@hostname:port