feat: 3-System 분리 프로젝트 초기 코드 작성
TK-FB(공장관리+신고)와 M-Project(부적합관리)를 3개 독립 시스템으로 분리하기 위한 전체 코드 구조 작성. - SSO 인증 서비스 (bcrypt + pbkdf2 이중 해시 지원) - System 1: 공장관리 (TK-FB 기반, 신고 코드 제거) - System 2: 신고 (TK-FB에서 workIssue 코드 추출) - System 3: 부적합관리 (M-Project 기반) - Gateway 포털 (path-based 라우팅) - 통합 docker-compose.yml 및 배포 스크립트 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
61
scripts/health-check.sh
Executable file
61
scripts/health-check.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
# ===================================================================
|
||||
# TK Factory Services - Health Check
|
||||
# ===================================================================
|
||||
|
||||
echo "=== TK Factory Services Health Check ==="
|
||||
echo ""
|
||||
|
||||
PASS=0
|
||||
FAIL=0
|
||||
SKIP=0
|
||||
|
||||
check_service() {
|
||||
local name="$1"
|
||||
local url="$2"
|
||||
local port="$3"
|
||||
|
||||
printf "%-25s " "$name"
|
||||
|
||||
# 포트 열림 확인
|
||||
if ! nc -z localhost "$port" 2>/dev/null; then
|
||||
echo "SKIP (port $port not open)"
|
||||
((SKIP++))
|
||||
return
|
||||
fi
|
||||
|
||||
# HTTP 확인
|
||||
local status
|
||||
status=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 3 "$url" 2>/dev/null)
|
||||
|
||||
if [ "$status" -ge 200 ] && [ "$status" -lt 400 ]; then
|
||||
echo "OK ($status)"
|
||||
((PASS++))
|
||||
else
|
||||
echo "FAIL ($status)"
|
||||
((FAIL++))
|
||||
fi
|
||||
}
|
||||
|
||||
check_service "Gateway" "http://localhost:30000/" 30000
|
||||
check_service "SSO Auth" "http://localhost:30050/health" 30050
|
||||
check_service "System 1 API" "http://localhost:30005/api/health" 30005
|
||||
check_service "System 1 Web" "http://localhost:30080/" 30080
|
||||
check_service "System 1 FastAPI" "http://localhost:30008/health" 30008
|
||||
check_service "System 2 API" "http://localhost:30105/api/health" 30105
|
||||
check_service "System 2 Web" "http://localhost:30180/" 30180
|
||||
check_service "System 3 API" "http://localhost:30200/api/health" 30200
|
||||
check_service "System 3 Web" "http://localhost:30280/" 30280
|
||||
check_service "phpMyAdmin" "http://localhost:30880/" 30880
|
||||
|
||||
echo ""
|
||||
echo "=== Docker Container Status ==="
|
||||
docker compose ps --format "table {{.Name}}\t{{.Status}}\t{{.Ports}}" 2>/dev/null || \
|
||||
echo "docker compose not available in this directory"
|
||||
|
||||
echo ""
|
||||
echo "Results: PASS=$PASS FAIL=$FAIL SKIP=$SKIP"
|
||||
|
||||
if [ "$FAIL" -gt 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user