ADD: sites and architecture module fix
This commit is contained in:
15
platform/Jenkinsfile
vendored
15
platform/Jenkinsfile
vendored
@@ -21,6 +21,12 @@ pipeline {
|
|||||||
stage('Deploy to Server 1') {
|
stage('Deploy to Server 1') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
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 stop management-platform 2>/dev/null || true
|
||||||
docker rm management-platform 2>/dev/null || true
|
docker rm management-platform 2>/dev/null || true
|
||||||
|
|
||||||
@@ -54,10 +60,13 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
sleep 3
|
sleep 3
|
||||||
if curl -f http://localhost:8088/ 2>/dev/null; then
|
# /login is public; / redirects and may not satisfy curl -f in all setups
|
||||||
echo "✅ Platform responding"
|
if curl -sf http://localhost:8088/login 2>/dev/null; then
|
||||||
|
echo "✅ Platform responding on :8088"
|
||||||
else
|
else
|
||||||
echo "⚠️ Health check failed"
|
echo "❌ Health check failed — container logs:"
|
||||||
|
docker logs management-platform --tail=40 2>/dev/null || true
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user