Skip to content

SaltireSoul/caddy-cf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

caddy

Caddyserver with the following modules included:

built for AMD64, ARM64 & ARMv7

Also a few custom environment variables.

Image Version Image Size

Image Docker Hub Registry Image GitHub Registry

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

Graceful reloads

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