Files
dbx-main/docs/diagrams/server-architecture.html
T
king 2a3272e514 docs: 서버 아키텍처 다이어그램(HTML) 추가
Proxmox → Gitea VM / Ubuntu VM → Docker(NPM·main-app·cafe24-worker·postgres-db)
연결 관계를 diagram-design 스타일 단일 HTML로 정리.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 03:20:36 +09:00

292 lines
21 KiB
HTML

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DBX ERP 서버 아키텍처</title>
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&family=Noto+Serif:ital@0;1&family=Noto+Sans+KR:wght@400;500;600&family=Noto+Serif+KR:wght@400&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--color-paper: #f5f5f5;
--color-ink: #2d3142;
--color-muted: #4f5d75;
--color-accent: #bf4520;
--font-sans: 'Geist', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
--font-serif: 'Instrument Serif', 'Noto Serif', 'Noto Serif KR', serif;
--font-mono: 'Geist Mono', ui-monospace, monospace;
}
body {
font-family: var(--font-sans);
background: var(--color-paper);
color: var(--color-ink);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 3rem 2rem;
}
.frame { max-width: 1320px; width: 100%; min-width: 0; }
.diagram-container { width: 100%; overflow-x: auto; }
.eyebrow {
font-family: var(--font-mono);
font-size: 0.66rem;
font-weight: 500;
letter-spacing: 0.18em;
text-transform: uppercase;
color: var(--color-muted);
margin-bottom: 0.5rem;
}
h1 {
font-family: var(--font-serif);
font-size: clamp(1.5rem, 2.4vw + 0.75rem, 2rem);
font-weight: 400;
letter-spacing: -0.02em;
line-height: 1.15;
color: var(--color-ink);
margin-bottom: 1.5rem;
}
.source {
margin-top: 1rem;
font-size: 0.8rem;
color: var(--color-muted);
}
.source code { font-family: var(--font-mono); font-size: 0.75rem; }
svg { width: 100%; min-width: 1280px; display: block; }
@media print {
.diagram-container { overflow-x: visible; }
svg { min-width: 0; }
}
</style>
</head>
<body>
<div class="frame">
<p class="eyebrow">Architecture · DBX ERP main-app</p>
<h1>DBX ERP 서버 아키텍처</h1>
<div class="diagram-container">
<svg viewBox="0 0 1280 720" xmlns="http://www.w3.org/2000/svg" role="img"
aria-labelledby="server-architecture-title server-architecture-desc"
data-grammar="architecture-containment">
<title id="server-architecture-title">DBX ERP 서버 아키텍처</title>
<desc id="server-architecture-desc">Proxmox 호스트 안의 Gitea VM과 Ubuntu VM, 그 안의 Docker에서 Nginx Proxy Manager가 main-app으로 요청을 넘기고 main-app이 PostgreSQL을 쓰며, 개발 PC 코드가 Gitea를 거쳐 서버로 배포되는 구성입니다.</desc>
<defs>
<pattern id="dots" width="22" height="22" patternUnits="userSpaceOnUse">
<circle cx="1" cy="1" r="0.9" fill="rgba(45,49,66,0.10)"/>
</pattern>
<marker id="arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#4f5d75"/></marker>
<marker id="arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#bf4520"/></marker>
<marker id="arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#2e5aa8"/></marker>
</defs>
<rect width="100%" height="100%" fill="#f5f5f5"/>
<rect width="100%" height="100%" fill="url(#dots)" opacity="0.55"/>
<!-- ===== Scopes (bg → scopes → arrows → nodes) ===== -->
<!-- Admin band: Proxmox host -->
<rect x="240" y="40" width="1008" height="580" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.16)" stroke-width="1"
data-role="bounds" data-scope-id="proxmox" data-scope-kind="admin"/>
<rect x="240.5" y="40.5" width="1007" height="23.5" fill="rgba(45,49,66,0.04)"/>
<line x1="240" y1="64" x2="1248" y2="64" stroke="rgba(45,49,66,0.16)" stroke-width="0.8"/>
<text x="256" y="56" fill="#5a6580" font-size="8" font-weight="500" font-family="'Geist Mono', monospace" letter-spacing="0.14em">PROXMOX VE · HYPERVISOR HOST</text>
<!-- Traffic box: Gitea VM / LXC -->
<rect x="264" y="96" width="192" height="136" rx="8" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.14)" stroke-width="0.8" stroke-dasharray="4,3"
data-role="bounds" data-scope-id="gitea-vm" data-scope-kind="traffic" data-parent="proxmox"/>
<rect x="276" y="100" width="92" height="12" rx="2" fill="#f5f5f5"/>
<text x="280" y="109" fill="#5a6580" font-size="7" font-family="'Geist Mono', monospace" letter-spacing="0.14em">GITEA · VM / LXC</text>
<!-- Traffic box: Ubuntu Server VM -->
<rect x="488" y="96" width="736" height="500" rx="8" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.14)" stroke-width="0.8" stroke-dasharray="4,3"
data-role="bounds" data-scope-id="ubuntu-vm" data-scope-kind="traffic" data-parent="proxmox"/>
<rect x="500" y="100" width="176" height="12" rx="2" fill="#f5f5f5"/>
<text x="504" y="109" fill="#5a6580" font-size="7" font-family="'Geist Mono', monospace" letter-spacing="0.14em">UBUNTU SERVER VM · 192.168.0.194</text>
<!-- Traffic box: Docker engine -->
<rect x="512" y="256" width="688" height="316" rx="8" fill="rgba(45,49,66,0.03)" stroke="rgba(45,49,66,0.16)" stroke-width="0.8" stroke-dasharray="4,3"
data-role="bounds" data-scope-id="docker" data-scope-kind="traffic" data-parent="ubuntu-vm"/>
<rect x="524" y="260" width="128" height="12" rx="2" fill="#f5f5f5"/>
<text x="528" y="269" fill="#5a6580" font-size="7" font-family="'Geist Mono', monospace" letter-spacing="0.14em">DOCKER ENGINE · COMPOSE</text>
<!-- ===== Arrows (behind nodes) ===== -->
<!-- Dev PC → Gitea: git push -->
<line x1="208" y1="176" x2="284" y2="176" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arrow)"/>
<!-- Gitea → deploy folder: git pull -->
<line x1="436" y1="176" x2="512" y2="176" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arrow)"/>
<!-- Deploy folder → main-app: compose build -->
<path d="M 704,176 H 860 Q 868,176 868,184 V 400" fill="none" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arrow)"/>
<!-- Browser → NPM: HTTPS -->
<line x1="208" y1="432" x2="536" y2="432" stroke="#2e5aa8" stroke-width="1.2" marker-end="url(#arrow-link)"/>
<!-- NPM → main-app: host port 8080 → container 8000 (primary) -->
<line x1="712" y1="432" x2="776" y2="432" stroke="#bf4520" stroke-width="1.4" marker-end="url(#arrow-accent)"/>
<!-- main-app → PostgreSQL -->
<line x1="960" y1="432" x2="1008" y2="432" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arrow)"/>
<!-- cafe24-worker → PostgreSQL -->
<path d="M 960,524 H 1084 Q 1092,524 1092,516 V 464" fill="none" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arrow)"/>
<!-- NPM → other services (dashed, hops over the build line) -->
<path d="M 624,400 V 328 Q 624,320 632,320 H 860 a 8,8 0 0,1 16,0 H 1008" fill="none" stroke="#4f5d75" stroke-width="1" stroke-dasharray="4,3" marker-end="url(#arrow)"/>
<!-- Other services → PostgreSQL (dashed) -->
<line x1="1092" y1="352" x2="1092" y2="400" stroke="#4f5d75" stroke-width="1" stroke-dasharray="4,3" marker-end="url(#arrow)"/>
<!-- ===== Arrow labels ===== -->
<rect x="216" y="156" width="56" height="12" rx="2" fill="#f5f5f5"/>
<text x="244" y="165" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">GIT PUSH</text>
<rect x="446" y="156" width="56" height="12" rx="2" fill="#f5f5f5"/>
<text x="474" y="165" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">GIT PULL</text>
<rect x="876" y="212" width="80" height="12" rx="2" fill="#f5f5f5"/>
<text x="916" y="221" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">COMPOSE BUILD</text>
<rect x="216" y="412" width="64" height="12" rx="2" fill="#f5f5f5"/>
<text x="248" y="421" fill="#2e5aa8" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">HTTPS :443</text>
<rect x="720" y="412" width="48" height="12" rx="2" fill="#f5f5f5"/>
<text x="744" y="421" fill="#bf4520" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">:8080</text>
<rect x="968" y="412" width="32" height="12" rx="2" fill="#f5f5f5"/>
<text x="984" y="421" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">SQL</text>
<rect x="724" y="300" width="40" height="12" rx="2" fill="#f5f5f5"/>
<text x="744" y="309" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">PROXY</text>
<!-- ===== Nodes ===== -->
<!-- Dev PC (input, outside Proxmox) -->
<rect x="32" y="144" width="176" height="64" rx="6" fill="#f5f5f5"/>
<rect x="32" y="144" width="176" height="64" rx="6" fill="rgba(79,93,117,0.10)" stroke="#5a6580" stroke-width="1"/>
<rect x="40" y="152" width="24" height="12" rx="2" fill="transparent" stroke="rgba(90,101,128,0.40)" stroke-width="0.8"/>
<text x="52" y="161" fill="#5a6580" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">DEV</text>
<text x="120" y="180" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif" text-anchor="middle">개발 PC</text>
<text x="120" y="196" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">Windows · push-gitea.bat</text>
<!-- Browser (input, outside Proxmox) -->
<rect x="32" y="400" width="176" height="64" rx="6" fill="#f5f5f5"/>
<rect x="32" y="400" width="176" height="64" rx="6" fill="rgba(79,93,117,0.10)" stroke="#5a6580" stroke-width="1"/>
<rect x="40" y="408" width="28" height="12" rx="2" fill="transparent" stroke="rgba(90,101,128,0.40)" stroke-width="0.8"/>
<text x="54" y="417" fill="#5a6580" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">USER</text>
<text x="120" y="436" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif" text-anchor="middle">사용자 브라우저</text>
<text x="120" y="452" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">dbx.no1king.freeddns.org</text>
<!-- Gitea -->
<rect x="284" y="144" width="152" height="64" rx="6" fill="#f5f5f5"
data-role="bounds" data-node-id="gitea" data-kind="compute" data-parent="gitea-vm"/>
<rect x="284" y="144" width="152" height="64" rx="6" fill="#ffffff" stroke="#2d3142" stroke-width="1"/>
<rect x="292" y="152" width="24" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.40)" stroke-width="0.8"/>
<text x="304" y="161" fill="#2d3142" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">GIT</text>
<text x="360" y="180" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', sans-serif" text-anchor="middle">Gitea</text>
<text x="360" y="196" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">king/dbx-main.git</text>
<!-- Deploy folder (host, outside Docker) -->
<rect x="512" y="144" width="192" height="64" rx="6" fill="#f5f5f5"
data-role="bounds" data-node-id="deploy-dir" data-kind="compute" data-parent="ubuntu-vm"/>
<rect x="512" y="144" width="192" height="64" rx="6" fill="#ffffff" stroke="#2d3142" stroke-width="1"/>
<rect x="520" y="152" width="32" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.40)" stroke-width="0.8"/>
<text x="536" y="161" fill="#2d3142" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">REPO</text>
<text x="608" y="180" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif" text-anchor="middle">배포 폴더</text>
<text x="608" y="196" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">/opt/www/main · .env</text>
<!-- Other services (optional) -->
<rect x="1008" y="288" width="168" height="64" rx="6" fill="#f5f5f5"
data-role="bounds" data-node-id="other-apps" data-kind="compute" data-parent="docker"/>
<rect x="1008" y="288" width="168" height="64" rx="6" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.20)" stroke-width="1" stroke-dasharray="4,3"/>
<rect x="1016" y="296" width="28" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.22)" stroke-width="0.8"/>
<text x="1030" y="305" fill="#5a6580" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">SVC</text>
<text x="1092" y="324" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif" text-anchor="middle">다른 서비스</text>
<text x="1092" y="340" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">CORM · orderlist-app</text>
<!-- Nginx Proxy Manager -->
<rect x="536" y="400" width="176" height="64" rx="6" fill="#f5f5f5"
data-role="bounds" data-node-id="npm" data-kind="compute" data-parent="docker"/>
<rect x="536" y="400" width="176" height="64" rx="6" fill="#ffffff" stroke="#2d3142" stroke-width="1"/>
<rect x="544" y="408" width="36" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.40)" stroke-width="0.8"/>
<text x="562" y="417" fill="#2d3142" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">PROXY</text>
<text x="624" y="436" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', sans-serif" text-anchor="middle">Nginx Proxy Manager</text>
<text x="624" y="452" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">npm-app · TLS · npm_default</text>
<!-- main-app (focal) -->
<rect x="776" y="400" width="184" height="64" rx="6" fill="#f5f5f5"
data-role="bounds" data-node-id="main-app" data-kind="compute" data-parent="docker"/>
<rect x="776" y="400" width="184" height="64" rx="6" fill="rgba(191,69,32,0.08)" stroke="#bf4520" stroke-width="1"/>
<rect x="784" y="408" width="24" height="12" rx="2" fill="transparent" stroke="rgba(191,69,32,0.50)" stroke-width="0.8"/>
<text x="796" y="417" fill="#bf4520" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">APP</text>
<text x="868" y="436" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', sans-serif" text-anchor="middle">main-app (FastAPI)</text>
<text x="868" y="452" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">dbx-main · :8000</text>
<!-- PostgreSQL (store) -->
<rect x="1008" y="400" width="168" height="64" rx="6" fill="#f5f5f5"
data-role="bounds" data-node-id="postgres" data-kind="compute" data-parent="docker"/>
<rect x="1008" y="400" width="168" height="64" rx="6" fill="rgba(45,49,66,0.05)" stroke="#4f5d75" stroke-width="1"/>
<rect x="1016" y="408" width="20" height="12" rx="2" fill="transparent" stroke="rgba(79,93,117,0.50)" stroke-width="0.8"/>
<text x="1026" y="417" fill="#4f5d75" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">DB</text>
<text x="1092" y="436" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', sans-serif" text-anchor="middle">PostgreSQL</text>
<text x="1092" y="452" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">postgres-db · :5432</text>
<!-- cafe24-worker -->
<rect x="776" y="492" width="184" height="64" rx="6" fill="#f5f5f5"
data-role="bounds" data-node-id="cafe24-worker" data-kind="compute" data-parent="docker"/>
<rect x="776" y="492" width="184" height="64" rx="6" fill="#ffffff" stroke="#2d3142" stroke-width="1"/>
<rect x="784" y="500" width="24" height="12" rx="2" fill="transparent" stroke="rgba(45,49,66,0.40)" stroke-width="0.8"/>
<text x="796" y="509" fill="#2d3142" font-size="7" font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.08em">JOB</text>
<text x="868" y="528" fill="#2d3142" font-size="12" font-weight="600" font-family="'Geist', sans-serif" text-anchor="middle">cafe24-worker</text>
<text x="868" y="544" fill="#4f5d75" font-size="9" font-family="'Geist Mono', monospace" text-anchor="middle">dbx-cafe24-worker · 60s</text>
<!-- Callout -->
<text x="536" y="500" fill="#4f5d75" font-size="13" font-style="italic" font-family="'Instrument Serif', 'Noto Serif', 'Noto Serif KR', serif">NPM과 main-app은 다른 Docker 망.</text>
<text x="536" y="518" fill="#4f5d75" font-size="13" font-style="italic" font-family="'Instrument Serif', 'Noto Serif', 'Noto Serif KR', serif">호스트 포트 8080 → 컨테이너 8000.</text>
<text x="536" y="544" fill="#5a6580" font-size="9" font-family="'Geist Mono', monospace">postgres_default:</text>
<text x="536" y="556" fill="#5a6580" font-size="9" font-family="'Geist Mono', monospace">main-app · worker · DB</text>
<!-- ===== Legend ===== -->
<line x1="40" y1="640" x2="1240" y2="640" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
<text x="40" y="656" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" letter-spacing="0.18em">LEGEND</text>
<g font-size="12" font-weight="500" fill="#4f5d75" font-family="'Geist', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif">
<rect x="40" y="670" width="14" height="10" rx="2" fill="rgba(191,69,32,0.08)" stroke="#bf4520" stroke-width="1"/>
<text x="60" y="679">핵심 앱</text>
<rect x="128" y="670" width="14" height="10" rx="2" fill="#ffffff" stroke="#2d3142" stroke-width="1"/>
<text x="148" y="679">서비스</text>
<rect x="208" y="670" width="14" height="10" rx="2" fill="rgba(45,49,66,0.05)" stroke="#4f5d75" stroke-width="1"/>
<text x="228" y="679">데이터베이스</text>
<rect x="324" y="670" width="14" height="10" rx="2" fill="rgba(79,93,117,0.10)" stroke="#5a6580" stroke-width="1"/>
<text x="344" y="679">사용자 · PC</text>
<rect x="436" y="670" width="14" height="10" rx="2" fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.20)" stroke-width="1" stroke-dasharray="4,3"/>
<text x="456" y="679">다른 서비스</text>
<line x1="552" y1="675" x2="580" y2="675" stroke="#2e5aa8" stroke-width="1.2" marker-end="url(#arrow-link)"/>
<text x="588" y="679">HTTPS 요청</text>
<line x1="684" y1="675" x2="712" y2="675" stroke="#bf4520" stroke-width="1.4" marker-end="url(#arrow-accent)"/>
<text x="720" y="679">주 요청 흐름</text>
<line x1="824" y1="675" x2="852" y2="675" stroke="#4f5d75" stroke-width="1.2" marker-end="url(#arrow)"/>
<text x="860" y="679">배포 · DB 연결</text>
<line x1="980" y1="675" x2="1008" y2="675" stroke="#4f5d75" stroke-width="1" stroke-dasharray="4,3" marker-end="url(#arrow)"/>
<text x="1016" y="679">다른 서비스 연결</text>
</g>
<rect x="1136" y="670" width="14" height="10" fill="rgba(45,49,66,0.04)" stroke="rgba(45,49,66,0.16)" stroke-width="1"/>
<text x="1156" y="679" fill="#4f5d75" font-size="12" font-weight="500" font-family="'Geist', sans-serif">Proxmox</text>
</svg>
</div>
<p class="source">근거: <code>docker-compose.yml</code> · <code>docs/SERVER_ARCHITECTURE.md</code> · <code>scripts/fix-orderlist-compose.sh</code> · <code>push-gitea.bat</code> (2026-10-30 기준)</p>
</div>
</body>
</html>