fix vald
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 14s
Build, Push and Deploy / deploy-staging (push) Successful in 36s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 0s

This commit is contained in:
eko
2026-04-05 00:39:10 +07:00
parent 2d2cb95600
commit eafa8d362f

View File

@@ -84,7 +84,7 @@ jobs:
echo "Starting new container..." echo "Starting new container..."
docker run -d \ docker run -d \
--restart unless-stopped \ --restart unless-stopped \
--health-cmd="curl -f http://localhost:8000 || exit 1" \ --health-cmd="curl -f http://127.0.0.1:8000 || exit 1" \
--health-interval=30s \ --health-interval=30s \
--health-timeout=10s \ --health-timeout=10s \
--health-retries=3 \ --health-retries=3 \
@@ -204,7 +204,7 @@ jobs:
echo "Starting new production container on port 8000..." echo "Starting new production container on port 8000..."
docker run -d \ docker run -d \
--restart unless-stopped \ --restart unless-stopped \
--health-cmd="curl -f http://localhost:8000 || exit 1" \ --health-cmd="curl -f http://127.0.0.1:8000 || exit 1" \
--health-interval=30s \ --health-interval=30s \
--health-timeout=10s \ --health-timeout=10s \
--health-start-period=40s \ --health-start-period=40s \
@@ -235,7 +235,7 @@ jobs:
# Test the application locally # Test the application locally
echo "" echo ""
echo "Testing application locally..." echo "Testing application locally..."
curl -f http://localhost:8000 > /dev/null 2>&1 && echo "✅ Application is responding on port 8000" || echo "⚠️ Application not responding on port 8000" curl -f http://127.0.0.1:8000 > /dev/null 2>&1 && echo "✅ Application is responding on port 8000" || echo "⚠️ Application not responding on port 8000"
else else
echo "❌ Production deployment failed! Checking logs:" echo "❌ Production deployment failed! Checking logs:"
docker logs kulakpos_web_prod || echo "No logs available" docker logs kulakpos_web_prod || echo "No logs available"
@@ -250,7 +250,7 @@ jobs:
echo "Rolling back to: $PREVIOUS_IMAGE" echo "Rolling back to: $PREVIOUS_IMAGE"
docker run -d \ docker run -d \
--restart unless-stopped \ --restart unless-stopped \
--health-cmd="curl -f http://localhost:8000 || exit 1" \ --health-cmd="curl -f http://127.0.0.1:8000 || exit 1" \
--health-interval=30s \ --health-interval=30s \
--health-timeout=10s \ --health-timeout=10s \
--health-start-period=40s \ --health-start-period=40s \
@@ -295,7 +295,7 @@ jobs:
# Test application response (with timeout and retry) # Test application response (with timeout and retry)
echo "Testing application response..." echo "Testing application response..."
for i in 1 2 3 4 5; do for i in 1 2 3 4 5; do
if curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000 | grep "200\|302"; then if curl -f -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8000 | grep "200\|302"; then
echo "✅ Application is responding" echo "✅ Application is responding"
break break
elif [ $i -eq 5 ]; then elif [ $i -eq 5 ]; then