Update monitor script for Harbor
Some checks failed
CI/CD Pipeline / Test Backend (push) Failing after 4s
CI/CD Pipeline / Test Frontend (push) Failing after 6s
CI/CD Pipeline / Build and Push Docker Images (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped

This commit is contained in:
continuist 2025-06-29 17:40:45 -04:00
parent 7e64571ae3
commit faf607b56c

View file

@ -111,17 +111,12 @@ monitor_ci_cd() {
echo "Uptime: $(uptime)"
echo
log_info "Docker Status:"
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
echo
log_info "Registry Status:"
if [ -d "/opt/registry" ]; then
cd /opt/registry
docker-compose ps
cd - > /dev/null
log_info "Harbor Status:"
if docker ps --format "table {{.Names}}\t{{.Status}}" | grep -q harbor; then
log_success "Harbor containers are running"
docker ps --format "table {{.Names}}\t{{.Status}}" | grep harbor
else
log_warning "Registry directory not found"
log_error "Harbor containers are not running"
fi
echo
@ -149,10 +144,10 @@ monitor_ci_cd() {
# Registry health check
log_info "Registry Health Check:"
if curl -s -f http://localhost:5000/v2/_catalog > /dev/null 2>&1; then
log_success "Registry is accessible"
if curl -s -f -k https://localhost/api/v2.0/health > /dev/null 2>&1; then
log_success "Harbor registry is accessible"
else
log_error "Registry is not accessible"
log_error "Harbor registry is not accessible"
fi
}