support SSL for redis (#122)

diff --git a/Dockerfile b/Dockerfile
index 03f4472..87d6a86 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,7 +10,7 @@
   apt-get install -y curl && \
   apt-get update && \
   apt-get remove -y nodejs && \
-  curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
+  curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
   apt-get install -y nodejs
 
 # only package.json
diff --git a/provider/app.js b/provider/app.js
index 9ba5f98..afd880d 100755
--- a/provider/app.js
+++ b/provider/app.js
@@ -3,6 +3,7 @@
  * Service which can be configured to listen for triggers from a provider.
  * The Provider will store, invoke, and POST whisk events appropriately.
  */
+var URL = require('url').URL;
 var http = require('http');
 var express = require('express');
 var bodyParser = require('body-parser');
@@ -129,9 +130,20 @@
 
     return new Promise(function(resolve, reject) {
         if (redisUrl) {
+            var client;
             var redis = require('redis');
             bluebird.promisifyAll(redis.RedisClient.prototype);
-            var client = redis.createClient(redisUrl);
+            if (redisUrl.startsWith('rediss://')) {
+                // If this is a rediss: connection, we have some other steps.
+                client = redis.createClient(redisUrl, {
+                    tls: { servername: new URL(redisUrl).hostname }
+                });
+                // This will, with node-redis 2.8, emit an error:
+                // "node_redis: WARNING: You passed "rediss" as protocol instead of the "redis" protocol!"
+                // This is a bogus message and should be fixed in a later release of the package.
+            } else {
+                client = redis.createClient(redisUrl);
+            }
 
             client.on('connect', function () {
                 resolve(client);