Enhance deployment logging in cmd_deploy function for better error tracking

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Jakub Dorfman 2026-04-26 23:06:03 +02:00
parent 8ace80a19f
commit ca6914c162

View file

@ -299,10 +299,18 @@ cmd_deploy() {
validate_name "${name}"
load_app "${name}"
echo "Starting deployment for app '${name}'" | systemd-cat -t panelctl -p info
cmd_render_route "${name}"
run_compose -f "${APP_COMPOSE_FILE}" up -d || fail "compose up failed"
if ! run_compose -f "${APP_COMPOSE_FILE}" up -d 2>&1 | systemd-cat -t panelctl -p info; then
echo "Deployment failed for app '${name}'" | systemd-cat -t panelctl -p err
fail "compose up failed"
fi
maybe_reload_caddy
echo "Successfully deployed app '${name}'" | systemd-cat -t panelctl -p info
echo "deployed app '${name}'"
}