- Update flows.example/update_caddy_config.yml with caddy_validate → caddy_reload → smoke test steps and hostname comments - Add flows.example/update_caddy_config_force.yml for docker compose hard restart variant - Add /flows/update-caddy-config UI page with reload/force-restart toggle, dry-run mode showing pending Caddyfile preview, hostname detection, and audit log link Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
1 KiB
YAML
27 lines
1 KiB
YAML
# Validate the Caddyfile and recreate the Caddy container (hard restart).
|
|
# Copy to /etc/ops-agent/flows/update_caddy_config_force.yml on the host.
|
|
#
|
|
# Use this flow instead of update_caddy_config.yml when a graceful reload
|
|
# is insufficient — e.g. after adding a new TLS listener, changing ports,
|
|
# or updating the Docker image itself.
|
|
#
|
|
# Steps:
|
|
# 1. Validate the Caddyfile syntax (caddy validate)
|
|
# 2. Recreate the Caddy container via docker compose (hard restart)
|
|
# 3. Smoke-test public hostnames: curl -I, expect 200/301/308/401
|
|
#
|
|
# See update_caddy_config.yml for instructions on registering smoke-test
|
|
# commands in commands.yml.
|
|
|
|
name: Update Caddy Config (Force Restart)
|
|
description: Validate the Caddyfile and recreate the Caddy container via docker compose
|
|
steps:
|
|
- command_key: caddy_validate
|
|
on_failure: abort
|
|
|
|
- command_key: caddy_compose_restart
|
|
on_failure: abort
|
|
|
|
# Add one smoke-test step per public hostname served by Caddy.
|
|
- command_key: curl_smoke_scrum4me_web
|
|
on_failure: continue
|