GithubHelp home page GithubHelp logo

dockerspy's Introduction

DockerSpy

The purpose of the project is to implement a service that inspects the Docker API and provides a dynamic configurator for nginx reverse proxy.

DockerSpy expects that each container being bring up will set an environment variable exposing the virtual host and virtual port.

Install

Choose an empty directory and run the commands below to install it.

$ cd /tmp $ git clone https://github.com/leopepe/DockerSpy.git $ cd dockerspy ; python setup.py install

Usage

To start the dockerspy process in foreground:

$ dockerspy -u 'unix://var/run/docker.sock' -o '/etc/nginx/conf.d/' -t 'templates/node.nodomain.conf'

It will start in foreground and locks the terminal. Use '&' to send it to background or use it with a process supervisory system such as Supervisor, Circus, forego etc.

TODO

  • PyDocs
  • System logging

Release: 1.0

  • The containers must be bring up with 2 environment variables VIRTUAL_HOST and VIRTUAL_PORT
  • The solution supports only 1 port per docker
  • Access to docker.sock is necessary in due to access docker api
  • Flexible template usage. Users can use -t option in CLI to specify the template file to be used to generate the config files for nodes.
  • Config and Args parser
  • Proper python distribution package

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.