diff --git a/examples/guestbook/php-redis/Dockerfile b/examples/guestbook/php-redis/Dockerfile
new file mode 100644
index 00000000000..3cf7c2cfa20
--- /dev/null
+++ b/examples/guestbook/php-redis/Dockerfile
@@ -0,0 +1,7 @@
+FROM brendanburns/php
+
+ADD index.php /var/www/index.php
+ADD controllers.js /var/www/controllers.js
+ADD index.html /var/www/index.html
+
+CMD /run.sh
diff --git a/examples/guestbook/php-redis/controllers.js b/examples/guestbook/php-redis/controllers.js
new file mode 100644
index 00000000000..1ea5bdce18f
--- /dev/null
+++ b/examples/guestbook/php-redis/controllers.js
@@ -0,0 +1,29 @@
+var redisApp = angular.module('redis', ['ui.bootstrap']);
+
+/**
+ * Constructor
+ */
+function RedisController() {}
+
+RedisController.prototype.onRedis = function() {
+ this.scope_.messages.push(this.scope_.msg);
+ this.scope_.msg = "";
+ var value = this.scope_.messages.join();
+ this.http_.get("/index.php?cmd=set&key=messages&value=" + value)
+ .success(angular.bind(this, function(data) {
+ this.scope_.redisResponse = "Updated.";
+ }));
+};
+
+redisApp.controller('RedisCtrl', function ($scope, $http, $location) {
+ $scope.controller = new RedisController();
+ $scope.controller.scope_ = $scope;
+ $scope.controller.location_ = $location;
+ $scope.controller.http_ = $http;
+
+ $scope.controller.http_.get("/index.php?cmd=get&key=messages")
+ .success(function(data) {
+ console.log(data);
+ $scope.messages = data.data.split(",");
+ });
+});
diff --git a/examples/guestbook/php-redis/index.html b/examples/guestbook/php-redis/index.html
new file mode 100644
index 00000000000..0d33d6d8ae8
--- /dev/null
+++ b/examples/guestbook/php-redis/index.html
@@ -0,0 +1,25 @@
+
+
+ Guestbook
+
+
+
+
+
+
+
+
+
diff --git a/examples/guestbook/php-redis/index.php b/examples/guestbook/php-redis/index.php
new file mode 100644
index 00000000000..5774b320908
--- /dev/null
+++ b/examples/guestbook/php-redis/index.php
@@ -0,0 +1,37 @@
+
+
+set_include_path('.:/usr/share/php:/usr/share/pear:/vendor/predis');
+
+error_reporting(E_ALL);
+ini_set('display_errors', 1);
+
+require 'predis/autoload.php';
+
+if (isset($_GET['cmd']) === true) {
+ header('Content-Type: application/json');
+ if ($_GET['cmd'] == 'set') {
+ $client = new Predis\Client([
+ 'scheme' => 'tcp',
+ 'host' => getenv('SERVICE_HOST'),
+ 'port' => getenv('REDISMASTER_SERVICE_PORT'),
+ ]);
+ $client->set($_GET['key'], $_GET['value']);
+ print('{"message": "Updated"}');
+ } else {
+ $read_port = getenv('REDISMASTER_SERVICE_PORT');
+
+ if (isset($_ENV['REDISSLAVE_SERVICE_PORT'])) {
+ $read_port = getenv('REDISSLAVE_SERVICE_PORT');
+ }
+ $client = new Predis\Client([
+ 'scheme' => 'tcp',
+ 'host' => getenv('SERVICE_HOST'),
+ 'port' => $read_port,
+ ]);
+
+ $value = $client->get($_GET['key']);
+ print('{"data": "' . $value . '"}');
+ }
+} else {
+ phpinfo();
+} ?>
diff --git a/examples/guestbook/redis-slave/Dockerfile b/examples/guestbook/redis-slave/Dockerfile
new file mode 100644
index 00000000000..1ce50fcc34e
--- /dev/null
+++ b/examples/guestbook/redis-slave/Dockerfile
@@ -0,0 +1,7 @@
+FROM dockerfile/redis
+
+ADD run.sh /run.sh
+
+RUN chmod a+x /run.sh
+
+CMD /run.sh
diff --git a/examples/guestbook/redis-slave/run.sh b/examples/guestbook/redis-slave/run.sh
new file mode 100755
index 00000000000..103809cd39c
--- /dev/null
+++ b/examples/guestbook/redis-slave/run.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+redis-server --slaveof $SERVICE_HOST $REDISMASTER_SERVICE_PORT