Skip to content

Instantly share code, notes, and snippets.

View marccampbell's full-sized avatar

Marc Campbell marccampbell

View GitHub Profile
@keeb-zz
keeb-zz / README.md
Created July 23, 2013 19:35
The power of Docker+Hipache - Immediate Test Environments, even with Static Port Forwarding

I do most of my development on a remote server or on a local virtual instance. It just makes more sense, being able to work in a portable environment and pick up where I leave off lets me worry less about environment and more about the problem at hand.

One of the problems with using a technology like VirtualBox in combination with Docker is that Docker containers are truly portable and should expose a random port chosen by the host while VirtualBox port forwarding is static. You could, for every container, create a new port forwarding rule in your VirtualBox configuration, but that requires you change host configuration to be able to run your application. Not ideal and certainly not portable.

Enter hipache. Hipache is the best way to configure reverse proxies. In this example, hipache is the entrypoint for all web traffic on the host. Running hipache in a container just like any other service allows for ultimate flexibility.

Vagrantfile

Vagrant is a cool way of abstracting VM semantics and spin