{"id":13807323,"url":"https://github.com/invzhi/caddy-docker-upstreams","last_synced_at":"2026-01-18T07:44:47.522Z","repository":{"id":182270355,"uuid":"663812190","full_name":"invzhi/caddy-docker-upstreams","owner":"invzhi","description":"Docker dynamic upstreams for Caddy.","archived":false,"fork":false,"pushed_at":"2025-09-08T02:47:38.000Z","size":133,"stargazers_count":32,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-08T04:26:49.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/invzhi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-08T06:51:54.000Z","updated_at":"2025-09-08T02:47:41.000Z","dependencies_parsed_at":"2024-05-31T07:29:15.036Z","dependency_job_id":"cf5fdcd6-638c-4c79-a5c0-9945bab2cc84","html_url":"https://github.com/invzhi/caddy-docker-upstreams","commit_stats":null,"previous_names":["invzhi/caddy-docker-upstreams"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/invzhi/caddy-docker-upstreams","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invzhi%2Fcaddy-docker-upstreams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invzhi%2Fcaddy-docker-upstreams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invzhi%2Fcaddy-docker-upstreams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invzhi%2Fcaddy-docker-upstreams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/invzhi","download_url":"https://codeload.github.com/invzhi/caddy-docker-upstreams/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invzhi%2Fcaddy-docker-upstreams/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28533172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T01:01:24.140Z","updated_at":"2026-01-18T07:44:47.513Z","avatar_url":"https://github.com/invzhi.png","language":"Go","funding_links":[],"categories":["Container Operations","Networking \u0026 Proxies"],"sub_categories":["Reverse Proxy"],"readme":"# Docker Dynamic Upstreams for Caddy.\n\nThis package implements a docker dynamic upstreams module for Caddy.\n\nRequires Caddy 2+.\n\n## Installation\n\nDownload from [official website](https://caddyserver.com/download?package=github.com%2Finvzhi%2Fcaddy-docker-upstreams)\nor build yourself using [xcaddy](https://github.com/caddyserver/xcaddy).\n\nHere is a Dockerfile example.\n\n```dockerfile\nFROM caddy:\u003cversion\u003e-builder AS builder\n\nRUN xcaddy build \\\n    --with github.com/invzhi/caddy-docker-upstreams\n\nFROM caddy:\u003cversion\u003e\n\nCOPY --from=builder /usr/bin/caddy /usr/bin/caddy\n```\n\n## Caddyfile Syntax\n\nList all your domain or use [On-Demand TLS](https://caddyserver.com/docs/automatic-https#on-demand-tls).\n\n```\napp1.example.com,\napp2.example.com,\napp3.example.com {\n    reverse_proxy {\n        dynamic docker\n    }\n}\n```\n\n## Docker Labels\n\nThis module requires the Docker Labels to provide the necessary information.\n\n| Label                                | Description                                                                                                                            |\n|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `com.caddyserver.http.enable`        | required, should be `true`                                                                                                             |\n| `com.caddyserver.http.network`       | optional, specify the docker network which caddy connecting through (if it is empty, the first network of container will be specified) |\n| `com.caddyserver.http.upstream.port` | required, specify the port                                                                                                             |\n\nAs well as the labels corresponding to the matcher.\n\n| Label                                      | Matcher                                                                  | Type       |\n|--------------------------------------------|--------------------------------------------------------------------------|------------|\n| `com.caddyserver.http.matchers.protocol`   | [protocol](https://caddyserver.com/docs/caddyfile/matchers#protocol)     | `string`   |\n| `com.caddyserver.http.matchers.host`       | [host](https://caddyserver.com/docs/caddyfile/matchers#host)             | `[]string` |\n| `com.caddyserver.http.matchers.method`     | [method](https://caddyserver.com/docs/caddyfile/matchers#method)         | `[]string` |\n| `com.caddyserver.http.matchers.path`       | [path](https://caddyserver.com/docs/caddyfile/matchers#path)             | `[]string` |\n| `com.caddyserver.http.matchers.query`      | [query](https://caddyserver.com/docs/caddyfile/matchers#query)           | `string`   |\n| `com.caddyserver.http.matchers.expression` | [expression](https://caddyserver.com/docs/caddyfile/matchers#expression) | `string`   |\n\nHere is a docker-compose.yml example with [vaultwarden](https://github.com/dani-garcia/vaultwarden).\n\n```yaml\nvaultwarden:\n  image: vaultwarden/server:${VAULTWARDEN_VERSION:-latest}\n  restart: unless-stopped\n  volumes:\n    - ${VAULTWARDEN_ROOT}:/data\n  labels:\n    com.caddyserver.http.enable: true\n    com.caddyserver.http.upstream.port: 80\n    com.caddyserver.http.matchers.host: \"vaultwarden.example.com bitwarden.example.com\"\n  environment:\n    DOMAIN: https://vaultwarden.example.com\n```\n\n## Docker Client\n\nEnvironment variables could configure the docker client:\n\n- `DOCKER_HOST` to set the URL to the docker server.\n- `DOCKER_API_VERSION` to set the version of the API to use, leave empty for latest.\n- `DOCKER_CERT_PATH` to specify the directory from which to load the TLS certificates (\"ca.pem\", \"cert.pem\", \"key.pem').\n- `DOCKER_TLS_VERIFY` to enable or disable TLS verification (off by default).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvzhi%2Fcaddy-docker-upstreams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvzhi%2Fcaddy-docker-upstreams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvzhi%2Fcaddy-docker-upstreams/lists"}