Skip to content

Commit 8f685d4

Browse files
committed
ADD logs
1 parent 8cebca8 commit 8f685d4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/ci-cd.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,21 @@ jobs:
9595
docker image prune -f
9696
9797
echo "Deployment with migrations and database seeding completed!"
98+
99+
# Check container status
100+
echo "=== Checking container status ==="
101+
docker compose -f docker-compose.prod.yml --profile data ps
102+
103+
# Show container logs for debugging
104+
echo "=== Container health check ==="
105+
docker ps --filter "name=smart-class" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
106+
107+
# Check if all services are running
108+
if docker compose -f docker-compose.prod.yml --profile data ps | grep -E "(Exit|Restarting)"; then
109+
echo "⚠️ WARNING: Some containers are not running properly!"
110+
echo "=== Showing logs for non-running containers ==="
111+
docker compose -f docker-compose.prod.yml --profile data logs --tail=50
112+
exit 1
113+
else
114+
echo "✅ All containers are running successfully!"
115+
fi

0 commit comments

Comments
 (0)