deploy
All checks were successful
Build & Deploy KLZ Cables / deploy (push) Successful in 11m33s

This commit is contained in:
2026-01-21 17:13:34 +01:00
parent 41dd897f08
commit ae60037708

View File

@@ -89,18 +89,37 @@ jobs:
echo '=== Logging into Docker registry ===' echo '=== Logging into Docker registry ==='
echo '${{ secrets.REGISTRY_PASS }}' | docker login registry.infra.mintel.me -u '${{ secrets.REGISTRY_USER }}' --password-stdin echo '${{ secrets.REGISTRY_PASS }}' | docker login registry.infra.mintel.me -u '${{ secrets.REGISTRY_USER }}' --password-stdin
echo '✓ Registry login successful' if [ $? -eq 0 ]; then
echo '✓ Registry login successful'
else
echo '✗ Registry login failed'
exit 1
fi
echo '=== Checking current containers ===' echo '=== Checking current containers ==='
docker compose ps docker compose ps
echo '=== Checking current image ==='
docker images registry.infra.mintel.me/mintel/klz-cables.com:latest
echo '=== Removing local image to force fresh pull ==='
docker rmi registry.infra.mintel.me/mintel/klz-cables.com:latest || true
echo '=== Pulling latest image ===' echo '=== Pulling latest image ==='
docker compose pull docker compose pull
echo '✓ Image pulled successfully' echo '✓ Image pull command completed'
echo '=== Verifying new image ===' echo '=== Verifying new image after pull ==='
docker images registry.infra.mintel.me/mintel/klz-cables.com:latest docker images registry.infra.mintel.me/mintel/klz-cables.com:latest
echo '=== Checking if image was actually updated ==='
if docker inspect registry.infra.mintel.me/mintel/klz-cables.com:latest >/dev/null 2>&1; then
echo '✓ Image exists locally'
else
echo '✗ Image pull failed - image not found locally'
exit 1
fi
echo '=== Stopping all containers ===' echo '=== Stopping all containers ==='
docker compose down docker compose down
echo '✓ Containers stopped' echo '✓ Containers stopped'
@@ -121,6 +140,17 @@ jobs:
echo '=== Checking varnish container logs ===' echo '=== Checking varnish container logs ==='
docker compose logs --tail=20 varnish docker compose logs --tail=20 varnish
echo '=== Verifying application health ==='
# Wait a bit more for the app to be fully ready
sleep 10
if curl -f -s http://localhost:80/health > /dev/null 2>&1; then
echo '✓ Application health check passed'
else
echo '✗ Application health check failed - checking app logs'
docker compose logs --tail=50 app
exit 1
fi
echo '=== Cleaning up old images ===' echo '=== Cleaning up old images ==='
docker image prune -f --filter 'until=24h' docker image prune -f --filter 'until=24h'