From f51d5755c2c60ad046f91d354968ead2c4f8e3f2 Mon Sep 17 00:00:00 2001 From: ameniboukattaya Date: Sun, 7 Jun 2026 18:06:09 +0100 Subject: [PATCH] ADD: sites and architecture module fix --- platform/Jenkinsfile | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/platform/Jenkinsfile b/platform/Jenkinsfile index 79da097..290b8b1 100644 --- a/platform/Jenkinsfile +++ b/platform/Jenkinsfile @@ -21,6 +21,12 @@ pipeline { stage('Deploy to Server 1') { steps { sh ''' + # Sync Python modules to host path — docker run mounts this OVER the image + # (new app.py in the image imports modules.sites etc.; host must stay in sync) + mkdir -p /root/management-platform/modules + cp -f ./platform/modules/*.py /root/management-platform/modules/ + echo "✅ Synced platform/modules → /root/management-platform/modules" + docker stop management-platform 2>/dev/null || true docker rm management-platform 2>/dev/null || true @@ -54,10 +60,13 @@ pipeline { steps { sh ''' sleep 3 - if curl -f http://localhost:8088/ 2>/dev/null; then - echo "✅ Platform responding" + # /login is public; / redirects and may not satisfy curl -f in all setups + if curl -sf http://localhost:8088/login 2>/dev/null; then + echo "✅ Platform responding on :8088" else - echo "⚠️ Health check failed" + echo "❌ Health check failed — container logs:" + docker logs management-platform --tail=40 2>/dev/null || true + exit 1 fi ''' }