Giter VIP home page Giter VIP logo

mirage's Introduction

mirage - reverse proxy frontend for docker

mirage is reverse proxy for docker container and container manager.

mirage can launch and terminate docker container and serve http request with specified subdomain. Additionaly, mirage passes variable to Dockerfile using environment variables.

Usage

  1. Setup mirage and edit configuration (see Setup section for detail.)
  2. Run mirage.

Following instructions use below settings.

host:
  webapi: docker.dev.example.net
  reverse_proxy_suffix: .dev.example.net
listen:
  HTTP: 80

Prerequisite: you should resolve *.dev.example.net to your docker host.

Using CLI

  1. Launch docker container using curl.
curl http://docker.dev.example.net/api/launch \
  -d subdomain=cool-feature \
  -d branch=feature/cool \
  -d image=myapp:latest
  1. Now, you can access to container using "http://cool-feature.dev.exmaple.net/".

  2. Terminate container using curl.

curl http://docker.dev.example.net/api/terminate \
  -d subdomain=cool-feature

Using Web Interface

  1. Access to mirage web interface via "http://docker.dev.example.net/".
  2. Press "Launch New Container".
  3. Fill launch options.
  • subdomain: cool-feature
  • branch: feature/cool
  • image: myapp:latest
  1. Now, you can access to container using "http://cool-feature.dev.exmaple.net/".
  2. Press "Terminate" button.

Customization

Mirage now supports custom parameter. Write your parameter on config.yml.

Mirage contains default parameter "branch" as below.

parameters:
  - name: branch
    env: GIT_BRANCH
    rule: ""
    required: true

You can add custom parameter. "rule" option is regexp string.

Setup

  1. Download binary or go get
  2. Rename config_sample.yml to config.yml
  3. Edit config.yml to your environment
  4. Change your domain setting to fit your config.yml
  5. Run mirage

License

The MIT License (MIT)

(c) 2014 acidlemon. (c) 2014 KAYAC Inc.

mirage's People

Contributors

9renpoto avatar acidlemon avatar konboi avatar shogo82148 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.