Skip to content

Instantly share code, notes, and snippets.

View TimoA200's full-sized avatar
🏠
Working from home

Timo Aeckerle TimoA200

🏠
Working from home
  • HewlettPackardEnterprise
  • Germany, Stuttgart
View GitHub Profile
@TimoA200
TimoA200 / caddy-reload.sh
Created March 27, 2020 11:05
trigger a graceful reload in caddy docker container
#!/bin/sh
# This script graceful reloads the Caddy server inside the docker container. Graceful means that caddy reloads its configuration with zero downtime.
# Warning: Only works on Linux
caddy_container_id=$(docker ps | grep caddy | awk '{print $1;}')
docker exec $caddy_container_id caddy reload --config /etc/caddy/Caddyfile --adapter caddyfile