feat: xavis ai_platform 기능 이전 및 ncue 환경 전환

xavis 소스·DB 스키마·활용사례/F-Scan/프롬프트 라이브러리 등 기능 반영.
@xavis.co.kr → @ncue.net, 관리자 토큰 ncue-admin, 런타임 data/ Git 추적 제외.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dsyoon
2026-05-26 22:27:48 +09:00
parent 7bee72f287
commit 073a8343dd
84 changed files with 10883 additions and 1043 deletions

View File

@@ -1,33 +1,19 @@
# =============================================================================
# ai.ncue.net — Apache 2.4+ SSL → Node webplatform (단일 백엔드)
# =============================================================================
# 필요 모듈: ssl, proxy, proxy_http, headers
# sudo a2enmod ssl proxy proxy_http headers
#
# Node listen 주소·포트는 .env 의 HOST / PORT 와 맞출 것 (기본 127.0.0.1:8030).
# 아래 127.0.0.1:8030 은 예시이며, 실제 프로세스 포트로 바꾸면 됩니다.
#
# 왜 경로별 ProxyPass 를 나누지 않나?
# - 이 저장소의 server.js 가 /chat, /learning, /admin, /ai-explore 등 모든 경로를 한 프로세스에서 처리합니다.
# - 동일 포트(8030)로 여러 줄 나누면 유지보수만 불필요하게 복잡해지고, 8018/8030 혼선만 생깁니다.
# - 한 줄 ProxyPass / 로 충분합니다.
#
# Apache 2.4.31+ : ProxyAddHeaders On 이 X-Forwarded-* 를 백엔드에 넘깁니다(클라이언트 IP 추적 등).
# 그보다 오래된 Apache 면 ProxyAddHeaders 줄을 제거하고, 필요 시 X-Forwarded-For 수동 설정을 검토하세요.
# =============================================================================
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName ai.ncue.net
ServerName ai.xavis.co.kr
ProxyPreserveHost On
# 대용량 업로드(회의 음성 등, 앱 MEETING_AUDIO_MAX_MB 와 맞출 것)
LimitRequestBody 314572800
# 전사·LLM 등 장시간 응답. 회의록 음성 SSE는 수 분 이상 걸릴 수 있음.
TimeOut 600
ProxyTimeout 600
# 앱 응답의 X-Accel-Buffering: no 는 Nginx 전용. Apache mod_proxy_http 는 무시하므로,
# 스트림이 끊기면 TimeOut/ProxyTimeout 과 VirtualHost 레벨 mod_deflate(전역 압축 시 text/event-stream) 여부를 점검.
# HTTPS 프록시임을 Node/앱에 알림 (쿠키 Secure, 리다이렉트 URL 등)
RequestHeader set X-Forwarded-Proto "https"
@@ -36,14 +22,15 @@
ProxyAddHeaders On
</IfModule>
ProxyPass / http://127.0.0.1:8030/
ProxyPassReverse / http://127.0.0.1:8030/
# 나머지 모든 요청 — Node.js Express (매직링크 인증 포함)
ProxyPass / http://127.0.0.1:8030/
ProxyPassReverse / http://127.0.0.1:8030/
SSLEngine on
Include /etc/letsencrypt/options-ssl-apache.conf
ErrorLog ${APACHE_LOG_DIR}/ai.ncue.net_ssl_error.log
CustomLog ${APACHE_LOG_DIR}/ai.ncue.net_ssl_access.log combined
ErrorLog ${APACHE_LOG_DIR}/ai.xavis.co.kr_ssl_error.log
CustomLog ${APACHE_LOG_DIR}/ai.xavis.co.kr_ssl_access.log combined
<Location />
<RequireAll>
@@ -52,7 +39,7 @@
</RequireAll>
</Location>
SSLCertificateFile /etc/letsencrypt/live/ncue.net-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ncue.net-0001/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/ai.xavis.co.kr/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ai.xavis.co.kr/privkey.pem
</VirtualHost>
</IfModule>