docs: add green-blue deployment and responsive testing guidance

- Document API client dynamic configuration for green-blue deployments
- Add environment variable override instructions (ApiClient__BaseUrl)
- Document responsive testing with Playwright (8 device sizes)
- Add test items and validation checklist
- Update troubleshooting section with green-blue and responsive issues
- Clarify deployment procedure and expansion points for zero-downtime

Testing coverage: Desktop, Tablet, Mobile - all verified for overflow,
accessibility, and font readiness.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-28 11:29:25 +09:00
parent 0d07b2d26a
commit b3baef012d
+39 -2
View File
@@ -461,15 +461,26 @@ ssh kjh2064@178.104.200.7
5432 : PostgreSQL (localhost 바인드)
```
### 3.3 배포 절차 (CI only)
### 3.3 배포 절차 (CI only) & Green-Blue 지원
배포는 수동 실행이 아니라 **Gitea Actions CI/CD**만 사용한다.
**표준 배포 (현재)**:
1. `master` 브랜치에 push
2. Gitea Actions가 `TaxBaik.Web`을 build/publish
3. CI가 서버의 `taxbaik` 서비스와 `~/taxbaik_active`를 갱신
4. CI가 서비스 재시작 후 `/taxbaik/admin/login`으로 헬스 체크
**API 클라이언트 설정 (Green-Blue 대비)**:
- API 클라이언트 Base URL이 이제 동적 설정됨: `appsettings.json` > `ApiClient:BaseUrl`
- 기본값: `http://localhost:5001/taxbaik/api/`
- 배포 시 환경변수로 오버라이드 가능:
```bash
export ApiClient__BaseUrl="http://localhost:5002/taxbaik/api/"
systemctl start taxbaik # 새 포트에 배포
```
- Nginx가 `/taxbaik` → active 포트로 라우팅하면 자동 전환됨
**운영 규칙**:
- 로컬 또는 서버에서 수동 `dotnet publish`로 운영 배포하지 않는다
- `rsync`로 직접 아티팩트를 올리지 않는다
@@ -904,7 +915,7 @@ curl http://127.0.0.1/taxbaik
curl http://127.0.0.1/taxbaik/admin/login
```
### E2E 테스트
### E2E 테스트 & 반응형 검증
```bash
# 문의 폼 제출
curl -X POST http://178.104.200.7/taxbaik/contact \
@@ -916,6 +927,30 @@ psql -U taxbaik -d taxbaikdb
SELECT * FROM inquiries ORDER BY created_at DESC LIMIT 1;
```
**반응형 디자인 E2E 테스트**:
```bash
# 모든 디바이스 크기에서 관리자 대시보드 검증 (Desktop, Tablet, Mobile)
export E2E_BASE_URL="http://localhost:5001/taxbaik"
export E2E_ADMIN_USERNAME="admin"
export E2E_ADMIN_PASSWORD="admin123"
# Playwright로 반응형 테스트 실행 (8개 디바이스 크기)
npx playwright test admin-responsive.spec.ts
# 단일 프로젝트만 (빠른 검증)
npx playwright test admin-responsive.spec.ts --project="Desktop Chrome"
```
**테스트 항목**:
- ✅ Desktop (1920px, 1440px, 1024px): 메트릭 4개 컬럼
- ✅ Tablet L/M (960px, 768px): 메트릭 3/2 컬럼
- ✅ Tablet S (600px): 메트릭 1 컬럼, 드로어 축소
- ✅ Mobile (480px, 375px): 메트릭 1 컬럼, 모바일 네비게이션
- ✅ 텍스트 가독성 (최소 폰트 11px)
- ✅ 버튼 접근성 (최소 20x20px)
- ✅ 폼 필드 너비 (200px 이상)
- ✅ 수평 오버플로우 없음 (모든 크기)
---
## 12. 문제 해결
@@ -928,6 +963,8 @@ SELECT * FROM inquiries ORDER BY created_at DESC LIMIT 1;
| Blazor WebSocket 안 됨 | `/taxbaik` location에 `proxy_http_version 1.1`, `Upgrade`, `Connection "Upgrade"` 헤더가 모두 있는지 확인 |
| 배포 후 503 | 서비스 시작 대기 (startup 시간 ~5초), `systemctl status taxbaik` 확인 |
| 로그인 실패 | `admin_users.password_hash`와 bcrypt 해시, `AuthService` 로그, `/api/auth/login` 응답 확인 |
| API 호출 실패 (배포 후) | Green-Blue 배포 시 `ApiClient__BaseUrl` 환경변수 확인 (현재 active 포트와 일치하는지) |
| 반응형 CSS 깨짐 | admin.css 로드 확인 (헬스 체크에 포함됨), 브라우저 DevTools에서 viewport 설정 확인 |
---