Skip to content

manyou-io/caddy-docker-upstreams

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Dynamic Upstreams for Caddy.

This package implements a docker dynamic upstreams module for Caddy.

Requires Caddy 2+.

Docker Labels

This module requires the Docker Labels to provide the necessary information.

  • com.caddyserver.http.enable should be true
  • com.caddyserver.http.upstream.port specify the port

As well as the labels corresponding to the matcher.

Label Matcher
com.caddyserver.http.matchers.protocol protocol
com.caddyserver.http.matchers.host host
com.caddyserver.http.matchers.method method
com.caddyserver.http.matchers.path path
com.caddyserver.http.matchers.query query
com.caddyserver.http.matchers.expression expression

Here is a docker-compose.yml example with vaultwarden.

vaultwarden:
  image: vaultwarden/server:${VAULTWARDEN_VERSION:-latest}
  restart: unless-stopped
  volumes:
    - ${VAULTWARDEN_ROOT}:/data
  labels:
    com.caddyserver.http.enable: true
    com.caddyserver.http.upstream.port: 80
    com.caddyserver.http.matchers.host: vaultwarden.example.com
  environment:
    DOMAIN: https://vaultwarden.example.com

Syntax

List all your domain or use On-Demand TLS.

app1.example.com,
app2.example.com,
app3.example.com {
    reverse_proxy {
        dynamic docker
    }
}

About

Docker dynamic upstreams for Caddy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%