Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/syp1975/caddy
Caddy v2 with docker proxy and some other plugins
https://github.com/syp1975/caddy
caddy caddyserver docker dockerfile
Last synced: 26 days ago
JSON representation
Caddy v2 with docker proxy and some other plugins
- Host: GitHub
- URL: https://github.com/syp1975/caddy
- Owner: syp1975
- Created: 2021-12-06T21:51:48.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-27T09:33:50.000Z (over 2 years ago)
- Last Synced: 2023-09-25T16:17:08.758Z (over 1 year ago)
- Topics: caddy, caddyserver, docker, dockerfile
- Language: Dockerfile
- Homepage:
- Size: 54.3 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Caddy v2 with docker proxy and some other plugins
Packaged as a docker image: `ghcr.io/syp1975/caddy`.
I use it to proxy containerized apps to my [Duck DNS](https://www.duckdns.org) subdomain trough a secure connection with a wildcard certificate issued by [Let's Encrypt](https://letsencrypt.org).
Image is automatically rebuilt when the base image `caddy:2-builder` or plugins are updated.
|Component|Description|
|---|---|
|[caddy](https://caddyserver.com)|Open source web server|
|[caddy-docker-proxy](https://github.com/lucaslorentz/caddy-docker-proxy)|Caddy as a reverse proxy for Docker|
|[duckdns](https://github.com/caddy-dns/duckdns)|Duck DNS module for Caddy|
|[caddy-auth-portal](https://github.com/greenpau/caddy-auth-portal)|Authentication Plugin for Caddy v2|
|[caddy-authorize](https://github.com/greenpau/caddy-authorize)|Authorization Plugin for Caddy v2 (JWT/PASETO)|
|[caddy-exec](https://github.com/abiosoft/caddy-exec)|Caddy v2 module for running one-off commands|## Run caddy server
```bash
docker network create caddy
docker run --name caddy -d --restart=unless-stopped \
--network=caddy -p 443:443 -p 80:80 \
-v /var/run/docker.sock:/var/run/docker.sock \
-l caddy.acme_dns='duckdns your_duckdns_token' \
-l caddy.email=your_email \
-e CADDY_INGRESS_NETWORKS=caddy \
ghcr.io/syp1975/caddy
```## Run a containerized app behind the proxy
```bash
docker run --name app_name -d \
--network=caddy \
-l caddy='*.your_sub_domain.duckdns.org' \
-l caddy.@app_name.host='app_name.your_sub_domain.duckdns.org' |
-l caddy.reverse_proxy='@app_name {{upstreams app_port}}' \
app_image
```\* There is no need to publish *app_port*, caddy proxy server already has access to the app port trough the caddy network
And your application will be proxied at `https://app_name.your_sub_domain.duckdns.org`
## TODO
- Configure authentication