/docker-paas

Docker Platform as a Service

Primary LanguageShellMIT LicenseMIT

Docker PAAS

Key Componets

Configuration

  • PAAS_HIPACHE_DIR
  • PAAS_APP_DOMAIN
  • PAAS_APP_DIR

Directory setup

var
+-- www
     |-- config
     |   |-- setup.sh
     |   +-- manage.sh
     +-- apps
          +-- myapp
               |-- docker-compose.yml
               +-- Dockerfile

Applications

Applications must be placed inside the /apps directory.

Web-workers

Web worker is the container you want exposed to the public Internet – in most cases this is your primary application. Each project may only have one web-worker and it must be exposing port 8080. This is how you specify one:

www:
  build: Dockerfile
  ports:
    - "8080"

Worker linking

This is how you link workers together:

db:
  image: postgres:latest

www:
  build: Dockerfile
  links:
    - db

Persistent data

This is how you ensure persistent data:

logs:
  image: tianon/true:latest
  volumes:
    - /var/logs/myservice
  command: /bin/true

www:
  build: Dockerfile
  volumes_from:
    - logs

Management

Start and stop Hipache:

manage.sh hipache start
manage.sh hipache stop

Create APP:

manage.sh <APP> add <GIT_REPO> <GIT_BRANCH>

Start and stop APPs:

manage.sh <APP> start
manage.sh <APP> stop

Configure APPs:

Configure environment variables per application.

manage.sh <APP> config [<KEY> [<VAL>] [--rm]]