ci(itms): 운영 nginx vhost(itms.wise.ai.kr) + 통합앱 QR 페이지(/mobile-app) 아티팩트
- 운영 리버스 프록시 템플릿(RHEL conf.d, certbot 개별 발급 안내) - dev/prod 공용 /mobile-app QR 페이지(중앙 ITSM APK 저장소 읽기전용 재사용) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
c93f916959
commit
4fae61105c
31
deploy/nginx/itms.wise.ai.kr.conf
Normal file
31
deploy/nginx/itms.wise.ai.kr.conf
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# itms.wise.ai.kr — ITMS 운영 리버스 프록시 (RHEL /etc/nginx/conf.d/ 배치)
|
||||||
|
# 운영서버 211.37.173.197(utimsurpai.cafe24.com). 브라우저 진입점 = front(:11020).
|
||||||
|
#
|
||||||
|
# 배치 절차:
|
||||||
|
# 1) 이 파일을 /etc/nginx/conf.d/itms.wise.ai.kr.conf 로 배치 (HTTP-only 상태)
|
||||||
|
# 2) front(:11020) 기동 확인
|
||||||
|
# 3) certbot --nginx -d itms.wise.ai.kr → 443 블록·리다이렉트 자동 주입
|
||||||
|
# 4) systemctl reload nginx
|
||||||
|
# ※ wise.ai.kr 인증서는 와일드카드 아님 → itms 서브도메인 개별 발급 필요(확인 완료).
|
||||||
|
# ※ 헬스체크는 Host 헤더 필수: curl -H "Host: itms.wise.ai.kr" http://127.0.0.1:11020/
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name itms.wise.ai.kr;
|
||||||
|
client_max_body_size 50m;
|
||||||
|
|
||||||
|
# 통합 메신저 앱 QR 다운로드 페이지(읽기전용, 중앙 ITSM APK 저장소 재사용)
|
||||||
|
location = /mobile-app {
|
||||||
|
alias /opt/itms/static/mobile-app.html;
|
||||||
|
default_type text/html;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:11020;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_read_timeout 120s;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -24,6 +24,12 @@ server {
|
|||||||
|
|
||||||
client_max_body_size 50m;
|
client_max_body_size 50m;
|
||||||
|
|
||||||
|
# 통합 메신저 앱 QR 다운로드 페이지(읽기전용, 중앙 ITSM APK 저장소 재사용)
|
||||||
|
location = /mobile-app {
|
||||||
|
alias /opt/itms/static/mobile-app.html;
|
||||||
|
default_type text/html;
|
||||||
|
}
|
||||||
|
|
||||||
# 웹 UI (front :11020) — 브라우저 진입점
|
# 웹 UI (front :11020) — 브라우저 진입점
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:11020;
|
proxy_pass http://127.0.0.1:11020;
|
||||||
|
|||||||
62
deploy/static/mobile-app.html
Normal file
62
deploy/static/mobile-app.html
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="ko">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>GUARDiA Messenger 앱 다운로드 — ITMS</title>
|
||||||
|
<style>
|
||||||
|
:root { --bg:#0f1420; --card:#182031; --ink:#e8edf6; --sub:#9fb0c8; --accent:#11c3ff; --line:#26324a; }
|
||||||
|
* { box-sizing:border-box; }
|
||||||
|
body { margin:0; font-family:"Pretendard","Malgun Gothic",system-ui,sans-serif; background:var(--bg); color:var(--ink);
|
||||||
|
min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
|
||||||
|
.card { background:var(--card); border:1px solid var(--line); border-radius:16px; max-width:420px; width:100%;
|
||||||
|
padding:32px 28px; text-align:center; box-shadow:0 8px 40px rgba(0,0,0,.35); }
|
||||||
|
h1 { font-size:20px; margin:0 0 4px; }
|
||||||
|
.app { font-size:15px; color:var(--accent); font-weight:600; margin-bottom:20px; }
|
||||||
|
.qr { background:#fff; border-radius:12px; padding:14px; display:inline-block; min-height:180px; min-width:180px; }
|
||||||
|
.qr img { width:180px; height:180px; display:block; }
|
||||||
|
.meta { margin:18px 0 8px; color:var(--sub); font-size:13px; line-height:1.7; }
|
||||||
|
.meta b { color:var(--ink); }
|
||||||
|
.btn { display:inline-block; margin-top:16px; padding:12px 22px; background:var(--accent); color:#04141c;
|
||||||
|
font-weight:700; text-decoration:none; border-radius:10px; font-size:15px; }
|
||||||
|
.note { margin-top:18px; font-size:11.5px; color:var(--sub); line-height:1.6; }
|
||||||
|
.err { color:#ff7a7a; font-size:13px; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="card">
|
||||||
|
<h1>모바일 앱 다운로드</h1>
|
||||||
|
<div class="app">GUARDiA Messenger</div>
|
||||||
|
<div class="qr" id="qrbox"><span class="err" style="color:#888">불러오는 중…</span></div>
|
||||||
|
<div class="meta" id="meta"></div>
|
||||||
|
<a class="btn" id="dl" href="#" style="display:none">APK 다운로드</a>
|
||||||
|
<div class="note">
|
||||||
|
Android 기기에서 QR을 스캔하거나 버튼으로 APK를 내려받아 설치하세요.<br>
|
||||||
|
본 페이지는 GUARDiA 중앙 앱 저장소(ITSM)의 최신 배포를 읽기 전용으로 표시합니다.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
// 중앙 ITSM 공개 엔드포인트(인증 불필요·CORS 허용)에서 최신 APK 정보 조회
|
||||||
|
var CENTRAL = "https://itsm.zioinfo.co.kr/api/app/public-latest";
|
||||||
|
fetch(CENTRAL, { cache: "no-store" })
|
||||||
|
.then(function(r){ return r.json(); })
|
||||||
|
.then(function(d){
|
||||||
|
if (!d || !d.has_version) { throw new Error("no version"); }
|
||||||
|
var qrbox = document.getElementById("qrbox");
|
||||||
|
qrbox.innerHTML = "";
|
||||||
|
var img = new Image(); img.src = d.qr_url; img.alt = "APK QR";
|
||||||
|
img.onerror = function(){ qrbox.innerHTML = '<span class="err">QR 이미지를 불러올 수 없습니다</span>'; };
|
||||||
|
qrbox.appendChild(img);
|
||||||
|
document.getElementById("meta").innerHTML =
|
||||||
|
"<b>" + (d.app_name||"") + "</b> v" + (d.version||"") + "<br>" +
|
||||||
|
(d.platform||"") + " · " + (d.file_size_mb||"?") + " MB";
|
||||||
|
var dl = document.getElementById("dl");
|
||||||
|
dl.href = d.download_url; dl.style.display = "inline-block";
|
||||||
|
})
|
||||||
|
.catch(function(e){
|
||||||
|
document.getElementById("qrbox").innerHTML =
|
||||||
|
'<span class="err">앱 정보를 불러올 수 없습니다.<br>잠시 후 다시 시도하세요.</span>';
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue
Block a user