From 735f343e0def1620a615a39a22cf73d5901482af Mon Sep 17 00:00:00 2001 From: Mortezakoohjani Date: Fri, 24 Jul 2026 20:37:12 +0330 Subject: [PATCH] Mark CRM production deploy verified and harden health wait. Document successful CRM 6.3 prod smoke checks and retry CRM /health during deploy. Co-authored-by: Cursor --- docs/next-steps.md | 2 +- scripts/deploy_crm_prod.py | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/docs/next-steps.md b/docs/next-steps.md index 3c192b0..6b2611d 100644 --- a/docs/next-steps.md +++ b/docs/next-steps.md @@ -17,7 +17,7 @@ CRM Core Platform (Phases 6.0–6.3) is complete: foundation, master data, sales ### Exit Criteria -- [ ] Production deploy verified for CRM 6.3 + accounting +- [x] Production deploy verified for CRM 6.3 + accounting (local + HTTPS health) - [ ] Provider registry AI entry → Active (when ready) - [x] CRM Core Platform docs (6.0–6.3) synced in registry / progress / API / glossary diff --git a/scripts/deploy_crm_prod.py b/scripts/deploy_crm_prod.py index d7f0f10..3ec41a8 100644 --- a/scripts/deploy_crm_prod.py +++ b/scripts/deploy_crm_prod.py @@ -250,17 +250,23 @@ docker compose logs --tail=100 crm-service code, health = run( app, - "curl -sf http://127.0.0.1:8003/health || curl -sf http://192.168.10.162:8003/health", + """ +set -e +for i in 1 2 3 4 5 6 7 8 9 10; do + if curl -sf http://127.0.0.1:8003/health; then + echo + echo CRM_HEALTH_OK + exit 0 + fi + sleep 3 +done +curl -sv http://127.0.0.1:8003/health || true +exit 1 +""", + timeout=120, ) - if code != 0 or "ok" not in health.lower() and '"status"' not in health: - # retry once after short wait - run(app, "sleep 8") - code, health = run( - app, - "curl -sf http://127.0.0.1:8003/health || curl -sf http://192.168.10.162:8003/health", - ) - if code != 0: - raise RuntimeError(f"CRM health failed: {health}") + if code != 0: + raise RuntimeError(f"CRM health failed: {health}") finally: app.close()