Created
March 27, 2020 11:05
-
-
Save TimoA200/c99f89bada9b877b97f7b20a6b4bf486 to your computer and use it in GitHub Desktop.
trigger a graceful reload in caddy docker container
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment