Docker Micro-PaaS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/commander add () to method call Mar 1, 2016
commander Work with change to content-addressable IDs Feb 26, 2016
config add maintenance mode support to Galaxy Oct 19, 2015
discovery add maintenance mode support to Galaxy Oct 19, 2015
runtime better error reporting Sep 23, 2016
utils Work with change to content-addressable IDs Feb 26, 2016
.gitignore Add some cross-compiling targets May 12, 2014
.travis.yml Update travis config Sep 8, 2015
Makefile Remove darwin-386 Jul 30, 2015 a few fixes to get the README examples into working shape May 8, 2015
galaxy.go Merge pull request #263 from joeshaw/ro-psql Sep 23, 2016


Docker Micro-PaaS



galaxy is a micro-paas designed for running 12-factor style, stateless, microservices within Docker containers while being lightweight and simple to operate. It handles the deployment, configuration and orchestration of Docker containers across multiple hosts.

It is ideally suited for running Docker containers:

  • Alongside existing applications while transitioning to containers
  • On clusters of 10's-100's of hosts
  • On existing or new infrastructure you are already using
  • For HTTP based micro-services


  • Minimal dependencies (two binaries and redis)
  • Automatic service registration, discovery and proxying of registered services.
  • Virtual Host HTTP(S) proxying
  • Container scheduling and scaling across hosts
  • Heroku style config variable interface
  • Container contraints (CPU/Mem)

There are two sub-projects: commander and shuttle.

  • Commander - Container deployment and service discovery.
  • Shuttle - An HTTP/TCP proxy that can be configured through a HTTP based API.

Getting Started

(These assume that Docker is running on your local host. If you're running it remotely, or via something like boot2docker, you'll need to adjust the GALAXY_REGISTRY_URL below and provide the -host-ip argument to commander agent.)

To setup a single host environment, run the following:

$ docker run -d --name redis -p 6379:6379 redis
$ export GALAXY_REGISTRY_URL=redis://
$ export GALAXY_ENV=local
$ export GALAXY_POOL=web
$ commander agent

To create a new app for nginx:

$ commander app:create nginx

To deploy a latest official nginx image to our nginx app:

$ commander app:deploy nginx nginx

Finally, we need to assign this app to our default web pool:

$ commander app:assign nginx

You should see nginx started by the commander agent process.

Exposing Services

To expose the nginx app, we need to run shuttle to handle request routing:

Start shuttle:

$ shuttle -http

This starts a shuttle with an admin server on (the default) and an HTTP server on

Next, stop your old commander agent and restart it, pointing to the shuttle admin address:

$ commander -shuttle-addr agent

Assign a service port to nginx:

$ commander runtime:set -port 8888 nginx

You should now be able to access the nginx app on host port 8888:

$ curl localhost:8888

Add a virtual host:

$ commander runtime:set -vhost my.domain nginx
$ curl -v my.domain:8080

Dev Setup

You need to have a docker 1.4.1+ and golang 1.4.

  1. Install glock
  2. make deps
  3. make