Public | Automated Build

Last pushed: 5 days ago
Short Description
caddy proxy with docker-gen
Full Description

caddy-proxy

Automated caddy proxy for Docker containers using docker-gen.

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 -e VIRTUAL_PORT=80  ...

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/docker/caddy-proxy:/root/.caddy --name caddy-proxy -p 80:80 -p 443:443 -e CADDY_OPTIONS="--email s@s.mk" -d miniers/caddy-proxy

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

support dnspod

$ docker run -e DNSPOD_API_KEY=3****,9cd446601*** -v /var/run/docker.sock:/tmp/docker.sock:ro -v /data/docker/caddy-proxy:/root/.caddy --name caddy-proxy -p 80:80 -p 443:443 -e CADDY_OPTIONS="--email s@s.mk" -d miniers/caddy-proxy

If you want reload caddy config

docker exec caddy-proxy reload
Docker Pull Command
Owner
miniers
Source Repository