Skip to content

Instantly share code, notes, and snippets.

@mmachatschek
Last active September 30, 2021 14:15
Show Gist options
  • Save mmachatschek/1924ad25174cef29c6181b8e30738020 to your computer and use it in GitHub Desktop.
Save mmachatschek/1924ad25174cef29c6181b8e30738020 to your computer and use it in GitHub Desktop.
Basic Caddyserver reverse proxy

Reloading the caddy instance after updating the Caddyfile config

docker-compose exec caddy caddy reload --config /etc/caddy/Caddyfile
domain.example.org {
reverse_proxy localhost:3000
}
version: "3.7"
services:
caddy:
image: caddy:2.4.5-alpine
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
volumes:
caddy_data:
external: true
caddy_config:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment