File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,15 +15,26 @@ echo "📅 Container built at: $BUILD_TIMESTAMP"
1515
1616# Function to sync logs on exit
1717cleanup () {
18+ echo " ═══════════════════════════════════════════════════════════════════════════════"
19+ echo " Cleanup stage of docker_and_sync.sh"
20+ echo " ═══════════════════════════════════════════════════════════════════════════════"
1821 local exit_code=$?
1922 if [ -n " $( ls -A logs/ 2> /dev/null) " ]; then
20- echo " Syncing logs to S3..."
23+ echo " Syncing codeclash logs to S3..."
2124 aws s3 sync logs/ s3://codeclash/logs/ || echo " Warning: Failed to sync logs to S3"
2225 else
23- echo " No logs to sync"
26+ echo " No codeclashlogs to sync"
2427 fi
28+ echo " docker ps:"
29+ docker ps
30+ echo " docker stats:"
31+ docker stats --no-stream
2532 echo " Docker space usage:"
2633 docker system df
34+ echo " --------------------------------"
35+ echo " Last 100 lines of Docker logs"
36+ docker ps -aq | xargs -I {} sh -c ' logs=$(docker logs --tail 100 {} 2>&1); [ -n "$logs" ] && echo "=== {} ===" && echo "$logs"' Retry
37+ echo " --------------------------------"
2738 echo " Docker cleanup"
2839 docker system prune -af
2940 echo " Docker space usage:"
You can’t perform that action at this time.
0 commit comments