|
4 | 4 |
|
5 | 5 | --- |
6 | 6 |
|
| 7 | +## โจ Features |
| 8 | + |
| 9 | +- ๋ชจ์ ์์ฑ |
| 10 | + |
| 11 | +- ๋ชจ์ ์ฐธ์ฌ |
| 12 | + |
| 13 | +- ์ถ๋ฐ์ง ๋ฑ๋ก |
| 14 | +-  |
| 15 | + |
| 16 | +- ์ค๊ฐ์ง์ ๊ฒฐ๊ณผ๋ณด๊ธฐ |
| 17 | + |
| 18 | +- ์ฅ์ ์ถ์ฒ |
| 19 | + |
| 20 | +--- |
| 21 | + |
7 | 22 | ## ๐ Tech Stack |
8 | 23 |
|
9 | 24 | ### Language |
|
99 | 114 |
|
100 | 115 | --- |
101 | 116 |
|
102 | | -## โ๏ธ Getting Started |
| 117 | +## ๐ Deployment |
103 | 118 |
|
104 | | -### Prerequisites |
| 119 | +### ๐ Service Architecture |
| 120 | +์ ์ฒด์ ์ธ ์์คํ
๊ตฌ์กฐ๋ **Nginx**๋ฅผ ๋ฆฌ๋ฒ์ค ํ๋ก์๋ก ํ์ฉํ๋ฉฐ, ์ ํ๋ฆฌ์ผ์ด์
์๋ฒ์ ๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ชจ๋ **Docker ์ปจํ
์ด๋**๋ก ๋
๋ฆฝ ์ด์๋ฉ๋๋ค. ์๋น์ค์ ์์ ์ ์ธ ์ด์์ ์ํด ๋ก๊ทธ ๋ฐ์ดํฐ๋ ํธ์คํธ ์๋ฒ์ ๋ณผ๋ฅจ ๋ง์ดํธ๋ฅผ ํตํด ์๊ตฌ ๋ณด๊ด๋ฉ๋๋ค. |
105 | 121 |
|
106 | | -- JDK 21 |
107 | | -- MariaDB (Local or Docker) |
| 122 | +* **Web Server**: Nginx (Reverse Proxy) |
| 123 | +* **Application Server**: Docker Containers (Spring Boot 3.x) |
| 124 | +* **Database**: Docker Container (MariaDB 10.11+) |
| 125 | +* **Log Management**: Host-Container Volume Mapping (`/logs`) |
108 | 126 |
|
109 | | -### Installation & Run |
110 | | - |
111 | | -1. **Repository Clone** |
| 127 | +--- |
112 | 128 |
|
113 | | -```bash |
114 | | -git clone [https://github.com/SWYP-mingling/Backend.git](https://github.com/SWYP-mingling/Backend.git) |
| 129 | +### ๐ป Infrastructure Detail |
| 130 | +| Infrastructure | Detail | |
| 131 | +| :--- | :--- | |
| 132 | +| **Cloud** | **NCP (Naver Cloud Platform)** | |
| 133 | +| **Instance** | Micro Server (Ubuntu 22.04 LTS) | |
| 134 | +| **Database** | MariaDB 10.11 (Dockerized) | |
| 135 | +| **Container** | Docker, Docker-compose | |
115 | 136 |
|
116 | | -``` |
117 | | - |
118 | | -2. **Build** |
| 137 | +--- |
119 | 138 |
|
120 | | -```bash |
121 | | -./gradlew build |
| 139 | +### ๐ CI/CD Pipeline |
| 140 | +GitHub Actions์ NCP Container Registry๋ฅผ ์ฐ๋ํ์ฌ ๋ฐฐํฌ ์๋ํ๋ฅผ ๊ตฌ์ถํ์ต๋๋ค. |
122 | 141 |
|
123 | | -``` |
| 142 | +1. **GitHub Actions**: `main` ๋ธ๋์น์ ์ฝ๋ Push ์ ๋น๋ ๋ฐ ํ
์คํธ ์๋ ์ํ |
| 143 | +2. **NCP Container Registry (NCR)**: ๋น๋๋ ์ด๋ฏธ์ง๋ฅผ NCP ์ ์ฉ ์ปจํ
์ด๋ ์ ์ฅ์์ Push ๋ฐ ๊ด๋ฆฌ |
| 144 | +3. **Deployment Flow**: |
| 145 | + * GitHub Actions์์ ํ๋ก์ ํธ ๋น๋ (Gradle) |
| 146 | + * Docker ์ด๋ฏธ์ง ์์ฑ ํ **NCP Container Registry**๋ก Push |
| 147 | + * ๋์ ์๋ฒ์ SSH ์ ์ ํ ์ต์ ์ด๋ฏธ์ง `pull` ๋ฐ `docker-compose` ์ฌ์คํ |
124 | 148 |
|
125 | | -3. **Run Application** |
| 149 | +--- |
126 | 150 |
|
127 | | -```bash |
128 | | -./gradlew bootRun |
| 151 | +### ๐พ Log Management |
| 152 | +์ปจํ
์ด๋ ์ฌ๋ฐฐํฌ ์์๋ ๊ณผ๊ฑฐ์ ์๋ฌ ๊ธฐ๋ก์ ๋ณด์กดํ๊ธฐ ์ํด ํธ์คํธ ์๋ฒ์ ํ์ผ ์์คํ
๊ณผ ๋๊ธฐํํ์ฌ ๊ด๋ฆฌํฉ๋๋ค. |
129 | 153 |
|
130 | | -``` |
| 154 | +* **๋ก๊ทธ ๋ณด๊ด ๊ฒฝ๋ก**: `/home/ncp-user/mingling-logs` (Host) โ `/logs` (Container) |
| 155 | +* **๋ก๊ทธ ํ์ผ ๊ตฌ์ฑ**: |
| 156 | + * `error.log`: ๋ชจ๋ **ERROR** ๋ ๋ฒจ ๋ก๊ทธ ๊ธฐ๋ก (์๋น์ค ์ฅ์ ์ถ์ ์ฉ) |
| 157 | + * `warn.log`: **WARN** ์ด์ ๋ ๋ฒจ ๋ก๊ทธ ๊ธฐ๋ก (์ ์ฌ์ ๋ฌธ์ ๋ชจ๋ํฐ๋ง์ฉ) |
| 158 | +* **๋ชจ๋ํฐ๋ง**: ์๋ฒ ํฐ๋ฏธ๋์์ `tail -f` ๋ช
๋ น์ด๋ฅผ ํตํด ์ค์๊ฐ์ผ๋ก ์์คํ
์ํ๋ฅผ ํ์ธํ ์ ์์ต๋๋ค. |
131 | 159 |
|
132 | 160 | --- |
133 | 161 |
|
|
0 commit comments