This is my own custom build of caddy with various installed modules and tweaks.
- Cloudflare DNS for easy wildcard SSL certs
- Caddy-l4 for proxying TCP/UDP connections
Custom launch script that combines a Caddyfile
(if present) together with any additional *.json
files (if present), and passes the result to caddy for its config on start. This came about so I could still use a normal Caddyfile alongside modules that only support JSON configuration (like caddy-l4).
A reload
script is included to re-run the config loading process and pass it to caddy reload
. Thus a simple docker exec [containername] reload
is all you need for easy zero-downtime config changes.
This process works by taking the output of caddy adapt -c /etc/caddy/Caddyfile
and merging it with any .json
files in the same directory using jq. Due to the way this is set up, both filetypes are optional so you can use either one with or without the other.
I'm also currently building both amd64 and arm64 versions of the image so I can easily run this on my Oracle Cloud ARM VM.
Same as the official caddy image:
-v /path/to/config:/etc/caddy
-v /path/to/data:/data
Your Caddyfile
and/or any JSON files go in the config folder and will be loaded on startup.