Caddyserver with the following modules included:
built for AMD64, ARM64 & ARMv7
Also a few custom environment variables.
docker run -it --name caddy \
-p 80:80 \
-p 443:443 \
-v $PWD/caddy_data:/data \
-v $PWD/caddy_config:/config \
-v $PWD/Caddyfile:/etc/caddy/Caddyfile \
-v $PWD/site:/srv \
-e [email protected] \
-e CLOUDFLARE_API_TOKEN=12345 \
-e ACME_AGREE=true \
ghcr.io/saltiresoul/caddy-cf:latest
Caddy does not require a full restart when configuration is changed. Caddy comes with a caddy reload command which can be used to reload its configuration with zero downtime.
caddy_container_id=$(docker ps | grep caddy | awk '{print $1;}')
docker exec -w /etc/caddy $caddy_container_id caddy reload