thread-master/deploy/prod/remote/status.sh

12 lines
522 B
Bash
Raw Normal View History

2026-07-14 08:54:31 +00:00
#!/usr/bin/env bash
set -euo pipefail
active=none
[[ -f /etc/harbor/active-slot ]] && active=$(cat /etc/harbor/active-slot)
printf 'active_slot=%s\n' "$active"
printf 'current_release=%s\n' "$(readlink -f /opt/harbor/current 2>/dev/null || printf none)"
systemctl --no-pager --full status "harbor-gateway@$active.service" "harbor-worker@$active.service" 2>/dev/null || true
docker compose --env-file /etc/harbor/harbor.env -f /opt/harbor/deploy/compose/docker-compose.yml ps
curl -fsS http://127.0.0.1/health
printf '\n'