|
1 | | -# YEONDEUNG-BE (μ°λ± λ°±μλ) |
| 1 | +# π―οΈ μ°λ± - λ°±μλ λ ν¬μ§ν 리 |
| 2 | +```textplain |
| 3 | +γ οΌΌβ/ γ ν©μ΄μ§ μ°λλ₯Ό μλ λ°λ»ν λΆλΉ |
| 4 | +( μ° λ± ) μ°λ νλ μ 보μ λͺ¨λ κ², |
| 5 | + "*. __ .*" μ§κΈ λ°λ‘ [μ°λ±]μμ νμΈνμΈμ. |
| 6 | +``` |
| 7 | +## νμ μκ° |
| 8 | +| νμν | κ³½ν΄λ¦Ό | μ‘μν | |
| 9 | +|--------|--------|--------| |
| 10 | +| BE Lead | BE | BE | |
| 11 | +| [@SH38038038](https://github.com/SH38038038) | [@Tulipurple](https://github.com/Tulipurple) | [@Hiimynameiss](https://github.com/Hiimynameiss) | |
| 12 | +| <img src="https://avatars.githubusercontent.com/SH38038038" width="100"> | <img src="https://avatars.githubusercontent.com/Tulipurple" width="100"> | <img src="https://avatars.githubusercontent.com/Hiimynameiss" width="100"> |
2 | 13 |
|
| 14 | +# μμ€ν
μν€ν
μ² |
| 15 | +```mermaid |
| 16 | +flowchart TD |
| 17 | + %% --- λμμΈ μμ€ν
--- |
| 18 | + classDef edge fill:#E1F5FE,stroke:#01579B,stroke-width:2px |
| 19 | + classDef aws fill:#FFF3E0,stroke:#E65100,stroke-width:2px |
| 20 | + classDef logic fill:#F3E5F5,stroke:#7B1FA2,stroke-width:2px |
| 21 | + classDef data fill:#E8F5E9,stroke:#2E7D32,stroke-width:2px |
| 22 | + classDef ai fill:#E0F2F1,stroke:#00796B,stroke-width:2px,stroke-dasharray: 5 5 |
3 | 23 |
|
4 | | -## π κ°λ° νκ²½ μ€ν λ°©λ² |
| 24 | + subgraph Global_Edge ["π Layer 7: Frontend & Masking"] |
| 25 | + User(("π€ User\n(Browser)")) |
| 26 | + FB_H["π₯ Firebase Hosting\n(Static Assets)"]:::edge |
| 27 | + FB_R["π‘οΈ Cloud Rewrites\n(API Masking Proxy)"]:::edge |
| 28 | + end |
5 | 29 |
|
6 | | -μ΄ νλ‘μ νΈλ Docker Composeλ₯Ό μ¬μ©νμ¬ λͺ¨λ κ°λ° νκ²½μ 1λΆ μμ ꡬμΆν μ μμ΅λλ€. |
| 30 | + subgraph AWS_EC2 ["βοΈ AWS Hardened Host (Docker Engine)"] |
| 31 | + direction TB |
| 32 | + |
| 33 | + subgraph Security_Gate ["π Security Layer"] |
| 34 | + Cert_Bot["π Certbot\n(SSL Auto-Renewal)"]:::aws |
| 35 | + DuckDNS["π¦ DuckDNS\n(DDNS Endpoint)"]:::aws |
| 36 | + end |
7 | 37 |
|
8 | | -1. **Docker Desktop**μ μ€μΉνκ³ μ€νν©λλ€. |
| 38 | + subgraph Container_Mesh ["π³ Isolated Docker Network"] |
| 39 | + direction TB |
| 40 | + subgraph App_Cluster ["π§ Logic Tier"] |
| 41 | + Node_App["π§© Node.js API\n(SSL Termination)"]:::logic |
| 42 | + AI_Logic["π€ OpenAI Pipeline"]:::ai |
| 43 | + end |
| 44 | + |
| 45 | + subgraph Data_Tier ["πΎ Persistence Tier"] |
| 46 | + direction LR |
| 47 | + MySQL[("π¬ MySQL 8.0")]:::data |
| 48 | + Redis[("π΄ Redis Cache")]:::data |
| 49 | + ES[("π Elasticsearch")]:::data |
| 50 | + end |
| 51 | + end |
| 52 | + end |
9 | 53 |
|
10 | | -2. μ΄ μ μ₯μ(repository)λ₯Ό `git clone` λ°μ΅λλ€. |
11 | | - ```bash |
12 | | - git clone https://github.com/Solux-WebBeing/yeondeung-BE.git |
13 | | - ``` |
| 54 | + Gemini_API[("π§ OpenAI API")]:::ai |
14 | 55 |
|
15 | | -3. **.env νμΌ μμ±** |
16 | | - `.env.example` νμΌμ 볡μ¬νμ¬ `.env` νμΌμ λ§λλλ€. |
17 | | - ```bash |
18 | | - cp .env.example .env |
19 | | - ``` |
| 56 | + %% --- λ°μ΄ν° νλ¦ --- |
| 57 | + User -- "HTTPS / TLS 1.3" --> FB_H |
| 58 | + FB_H -- "Path Masking" --> FB_R |
| 59 | + FB_R == "Secure Tunnel" ==> DuckDNS |
| 60 | + |
| 61 | + DuckDNS --> Node_App |
| 62 | + Cert_Bot -. "SSL Certificate" .-> Node_App |
| 63 | + |
| 64 | + Node_App <--> AI_Logic |
| 65 | + AI_Logic -- "External Request" --> Gemini_API |
| 66 | + |
| 67 | + Node_App <--> MySQL |
| 68 | + Node_App <--> Redis |
| 69 | + Node_App <--> ES |
20 | 70 |
|
21 | | -4. **.env νμΌ μμ ** |
22 | | - λ°©κΈ μμ±ν `.env` νμΌμ μ΄μ΄, λΉμ΄μλ `DB_PASSWORD`μ `JWT_SECRET` κ°μ (νμ κ°μ 곡μ λ) μ€μ κ°μΌλ‘ μ±μλ£μ΅λλ€. (λ
Έμ
μ°Έκ³ ) |
23 | | - |
24 | | -5. **Docker 컨ν
μ΄λ μ€ν** |
25 | | - ```bash |
26 | | - docker-compose up -d --build #μ½λ μμ μ λΉλ νμ (μ½λ μμ μμ΄ κ·Έλ₯ νμΈλ§ νμνλ©΄ μ΅μ
μ κ±°) |
27 | | - ``` |
28 | | - |
29 | | -6. μλ£! λΈλΌμ°μ μμ `http://localhost:8000/api-docs`μΌλ‘ μ μνμΈμ. (swaggerμμ api ν
μ€νΈ κ°λ₯) |
| 71 | + %% CI/CD |
| 72 | + GHA["βοΈ GH Actions"] -. "Deploy" .-> FB_H |
| 73 | + GHA -. "Docker Push/Up" .-> Node_App |
| 74 | +``` |
0 commit comments