93 lines
2.3 KiB
Markdown
93 lines
2.3 KiB
Markdown
# exdev.co.kr 서브도메인 분리 — stock / chatbot
|
|
|
|
| 서비스 | URL |
|
|
|--------|-----|
|
|
| **GoldenChart** | https://stock.exdev.co.kr |
|
|
| **Chatbot** | https://chatbot.exdev.co.kr/chatbot/* |
|
|
| **Legacy apex** | https://exdev.co.kr → stock 또는 chatbot으로 301 |
|
|
|
|
## 1. DNS (Gabia 등)
|
|
|
|
| 호스트 | 타입 | 값 |
|
|
|--------|------|-----|
|
|
| `stock` | A | 서버 공인 IP |
|
|
| `chatbot` | A | 서버 공인 IP |
|
|
|
|
## 2. SSL 인증서 (exAIChatbot2.0 서버)
|
|
|
|
```bash
|
|
cd /path/to/exAIChatbot2.0
|
|
# env: STOCK_DOMAIN, CHATBOT_DOMAIN (env.exdev 참고)
|
|
bash scripts/exdev/obtain-cert-exdev.sh # exdev + stock + chatbot SAN
|
|
bash scripts/exdev/start-https-caddy.sh
|
|
```
|
|
|
|
Caddyfile: `docker/caddy/Caddyfile.exdev`
|
|
|
|
## 3. GoldenChart
|
|
|
|
서버 `.env`:
|
|
|
|
```env
|
|
GC_DESKTOP_APP_PUBLIC_BASE_URL=https://stock.exdev.co.kr
|
|
GC_MOBILE_APP_PUBLIC_BASE_URL=https://stock.exdev.co.kr
|
|
```
|
|
|
|
Desktop updater / Jenkins:
|
|
|
|
```bash
|
|
export DESKTOP_UPDATE_BASE_URL=https://stock.exdev.co.kr/desktop/updates
|
|
```
|
|
|
|
검증:
|
|
|
|
```bash
|
|
curl -sS https://stock.exdev.co.kr/ | head
|
|
DESKTOP_UPDATE_BASE_URL=https://stock.exdev.co.kr/desktop/updates ./scripts/verify-desktop-updater-endpoint.sh
|
|
```
|
|
|
|
## 4. Chatbot
|
|
|
|
`.env` (env.exdev):
|
|
|
|
```env
|
|
PUBLIC_BASE_URL=https://chatbot.exdev.co.kr
|
|
CHATBOT_DOMAIN=chatbot.exdev.co.kr
|
|
```
|
|
|
|
카카오 스킬 URL 예:
|
|
|
|
- Q&A: `https://chatbot.exdev.co.kr/chatbot/kakao/skill`
|
|
- 챗봇홈: `https://chatbot.exdev.co.kr/chatbot/app/`
|
|
|
|
검증:
|
|
|
|
```bash
|
|
curl -sS https://chatbot.exdev.co.kr/chatbot/health
|
|
curl -sS https://chatbot.exdev.co.kr/chatbot/app/ | head
|
|
```
|
|
|
|
## 5. SSH / git remote
|
|
|
|
서버 SSH·배포 스크립트의 `REMOTE_HOST=exdev.co.kr` 는 **그대로** 둡니다 (서버 내부·스크립트용).
|
|
|
|
**로컬 Mac에서 `git push` 시 `Could not resolve hostname exdev.co.kr`**
|
|
|
|
일부 네트워크(회사·VPN·ISP)에서는 apex `exdev.co.kr` DNS만 실패하고 `stock.exdev.co.kr` 은 정상입니다.
|
|
같은 서버이므로 **git remote 만** 서브도메인으로 바꿉니다:
|
|
|
|
```bash
|
|
git remote set-url origin ssh://aidev@stock.exdev.co.kr/Volumes/ADATA/git/goldenChart.git
|
|
git push origin main
|
|
```
|
|
|
|
또는 `/etc/hosts` 에 `125.244.198.119 exdev.co.kr` 추가.
|
|
|
|
`~/.ssh/config` 예:
|
|
|
|
```
|
|
Host exdev exdev.co.kr stock.exdev.co.kr
|
|
HostName stock.exdev.co.kr
|
|
User aidev
|
|
```
|