#!/usr/bin/env sh set -eu # Validate config, then reload OpenResty after conf changes. ROOT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" cd "$ROOT_DIR" . "$ROOT_DIR/scripts/lib-compose.sh" echo "Validating Docker Compose configuration..." compose config >/dev/null echo "Validating OpenResty configuration..." compose exec -T openresty openresty -t echo "Reloading OpenResty..." if compose exec -T openresty openresty -s reload; then echo "OpenResty reloaded." else echo "Reload failed; restarting OpenResty..." compose restart openresty fi echo "Done."