Git Product home page Git Product logo

dokku-hosts's Introduction

Hosts Plugin for Dokku

Plugin for setting etc/hosts entries within the app container

Project: https://github.com/progrium/dokku

Warning: This plugin is under development and still only tested with the below dependencies

Useful when needing to set a host to be accessed within one app and for some reason using the IP address is not an option.

For example, when you have another dokku instance running at 199.10.32.3 and you access it via myapp.dokku.me mapped in your dev machine's /etc/hosts file:

# /etc/hosts
199.10.32.3 myapp.dokku.me

Requirements

Only tried with the following so far

  • Docker version 1.5.0 or higher
  • Dokku version 0.3.15 or higher

Installation

cd /var/lib/dokku/plugins
git clone https://github.com/alfetopito/dokku-hosts-plugin/ hosts

No need to install the plugin

Commands

$ dokku help
    hosts:add <app> <ip> <hostname>                 Sets <ip> and <hostname> for <app>
    hosts:list <app>                                Lists all custom hosts set for <app>
    hosts:remove <app> <hostname>                   Removes <hostname> from <app>
    hosts:removeall <app>                           Removes all hosts set for <app>

Simple usage

Make sure your app is running.

Add a ip/hostname to your app's etc/hosts

$ dokku hosts:add myapp 0.0.0.0 myhost.com 

List currently set hosts

$ dokku hosts:list myapp

Advanced usage

Remove one entry

$ dokku hosts:remove myapp myhost.com

Remove all entries

$ dokku hosts:removeall myapp

TODO

  • Set configured hosts to every created app container, not just the ones existing after a deploy #1

dokku-hosts's People

Contributors

alfetopito avatar erik-h avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

keij0

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.