This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |