https://github.com/simplificator/caddy-reverse-proxy
https://github.com/simplificator/caddy-reverse-proxy
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/simplificator/caddy-reverse-proxy
- Owner: simplificator
- License: mit
- Created: 2022-12-01T08:52:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-31T08:39:04.000Z (almost 2 years ago)
- Last Synced: 2025-01-01T10:15:31.727Z (over 1 year ago)
- Language: Dockerfile
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Simplificator's Caddy Reverse Proxy
[](https://github.com/simplificator/caddy-reverse-proxy/actions/workflows/build.yml)
This repository provides a modified Caddy to pass the active domains as environment variables. Certificates are issued automatically.
The following environment variables are required:
* `ALTERNATIVE_DOMAINS`: A comma-separated list of additional domains for which Caddy should get certificates. Requests to these domains redirect to `MAIN_DOMAIN`.
* `MAIN_DOMAIN`: The main domain for your site.
* `UPSTREAM_URL`: The service where Caddy sends the incoming requests.
We recommend mounting `/data` out of the container as Caddy saves the retrieved certificates and additional metadata to this directory.
Example:
```yaml
version: "3.9"
services:
app:
image: "user/myapp"
caddy:
image: simplificator/caddy-reverse-proxy:1
volumes:
- /data/caddy:/data
environment:
ALTERNATIVE_DOMAINS: "another.domain,second.domain"
MAIN_DOMAIN: "main.domain"
UPSTREAM_URL: "app:3000"
ports:
- "80:80"
- "443:443"
- "443:443/udp"
```
## License
Our configuration is released under the MIT license. Caddy is a registered trademark of Stack Holdings GmbH.