Public | Automated Build

Last pushed: 3 years ago
Short Description
Hipache + Redis inside of Docker
Full Description


Hipache + Redis inside of Docker

Getting hidocker

Build the hidocker container from source. This is useful if you want to add SSL support, be sure to modify the Dockerfile where appropriate!

git clone && cd hidocker 
docker build --rm=true --tag="hidocker" .

Or pull from the Docker CDN.

docker pull evanscottgray/hidocker


Start the hidocker container.

docker run -d -p 80:80 -p 6379:6379 evanscottgray/hidocker

Push a frontend with redis-cli.

redis-cli -h -p 6379 rpush app1
redis-cli -h -p 6379 rpush  http://$ip_of_app_1_node_1:$port_of_app_1_node_1

Keep in mind that Hipache acts as a Load Balancer as well as a Reverse Proxy, so you can add multiple nodes to one frontend.

redis-cli -h -p 6379 rpush  http://$ip_of_app_1_node_2:$port_of_app_1_node_2
redis-cli -h -p 6379 rpush  http://$ip_of_app_1_node_3:$port_of_app_1_node_3
redis-cli -h -p 6379 rpush  http://$ip_of_app_1_node_4:$port_of_app_1_node_4

DNS Stuff

Hipache works very well when you have a Domain or a Subdomain dedicated to it. If I have and I want to host applications on * then I need to do two things.

  1. Create a DNS A record that points to the Public IP of the server running this container.
  2. Create a DNS CNAME record to point * to

The same applies if you have and you want to host applications on, simply create the A record pointing the Public IP of the server running Hipache to and then CNAME to and BOOM you've got a new location to host apps.


The default arguments in this README don't really provide any security of any sort, the redis port is wide open for anyone to edit and play with, and there are also no passwords on the database.

For a real 'production' deploy of Hipache, you should probably look into configuring SSL in the config.json and also locking down access to the Redis instance by not publishing the port publicly.

Sample SSL Config

Here is a sample configuration for adding SSL support, you'll obviously have to rebuild the container as well as change out a few variables if you want to run this way.

    "server": {
        "accessLog": "/var/log/hipache_access.log",
        "port": 80,
        "workers": 5,
        "maxSockets": 100,
        "deadBackendTTL": 30,
        "address": [
        "address6": [
        "https": {
            "port": 443,
            "key": "/root/",
            "cert": "/root/"
    "redisHost": "",
    "redisPort": 6379,
    "redisDatabase": 0

Quick SSL Overview

To generate your own SSL key/certificate, you can use the following sequence of commands replacing arguments where appropriate:

openssl genrsa -des3 -passout pass:x -out 2048
openssl rsa -passin pass:x -in -out
openssl req -new -key -out
openssl x509 -req -days 365 -in -signkey -out

You'll then need to add these to the container by modifying the Dockerfile.

Docker Pull Command
Source Repository