ADD: sites and architecture module fix

This commit is contained in:
2026-06-07 18:11:02 +01:00
parent f51d5755c2
commit c3fbb0b9da
2 changed files with 9 additions and 16 deletions

View File

@@ -14,5 +14,6 @@ COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt flask psutil
COPY . .
EXPOSE 8000
EXPOSE 5000
CMD ["python", "app.py"]

10
platform/Jenkinsfile vendored
View File

@@ -21,12 +21,6 @@ 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
@@ -40,7 +34,6 @@ pipeline {
-v /etc/passwd:/etc/passwd:ro \
-v /etc/shadow:/etc/shadow:ro \
-v /root/management-platform/config.py:/app/config.py:ro \
-v /root/management-platform/modules:/app/modules:ro \
management-platform:latest
sleep 5
@@ -49,7 +42,7 @@ pipeline {
echo "✅ Deployed successfully"
else
echo "❌ Container failed to start"
docker logs management-platform --tail=20
docker logs management-platform --tail=30
exit 1
fi
'''
@@ -60,7 +53,6 @@ pipeline {
steps {
sh '''
sleep 3
# /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