Skip to content

ilkka/caddy-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

caddy-proxy

Automated caddy proxy for Docker containers using docker-gen, based on BlackGlory's version.

Usage

Start any containers you want proxied with an env var VIRTUAL_HOST=subdomain.youdomain.com just like nginx-proxy:

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

Traffic is proxied from HTTP and HTTPS ports to exported ports on the containers. If the containers export more than one port, the proxied port should be set by setting VIRTUAL_PORT in the environment of the container.

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_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 blackglory/caddy-proxy:0.2.1

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •