GithubHelp home page GithubHelp logo

kyleamathews / caddy-path-proxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davad/caddy-path-proxy

1.0 3.0 0.0 9 KB

Automated caddy proxy for Docker containers using docker-gen

License: MIT License

caddy-path-proxy's Introduction

caddy-path-proxy

Automated caddy proxy for Docker containers using docker-gen. Inspired by caddy-proxy and nginx-proxy.

Usage

Start any containers you want proxied with env vars VIRTUAL_PATH=/some/path and VIRTUAL_HOST=foo.bar.com.

    $ docker run -e VIRTUAL_PATH=/foo -e VIRTUAL_HOST=foo.bar.com ...

If you want the container protected by HTTP Basic Authentication add a BASIC_AUTH env var with the path to protect (i.e. /), username, and password:

    $ docker run -e VIRTUAL_PATH=/foo -e VIRTUAL_HOST=foo.bar.com -e BASIC_AUTH="/ myname mysecrect" ...

Then to run it:

    $ docker run -v /var/run/docker.sock:/tmp/docker.sock:ro -v /data/.caddy:/root/.caddy --name caddy-proxy -p 80:80 -p 443:443 -e CADDY_OPTIONS="--email [email protected]" -d davad/caddy-path-proxy

When you launch new (or stop) containers caddy-proxy will restart to make the new containers available.

If VIRTUAL_PATH is empty, / is assumed.

Known bug

Containers with VIRTUAL_PATH=/ sometimes block containers with VIRTUAL_PATH=/something/else.

caddy-path-proxy's People

Contributors

arnested avatar blackglory avatar davad avatar

Stargazers

 avatar

Watchers

 avatar  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.