Deploy: GitHub submodule sync 2026-07-23 12:46:52
This commit is contained in:
+58
-9
@@ -2,6 +2,33 @@
|
||||
|
||||
`chatbot.exdev.co.kr` Mac Studio 서버에 Agent 2.0 스택(RAG + WAS + Skill + chatbotApp)을 배포합니다.
|
||||
|
||||
## GitHub upstream (submodule)
|
||||
|
||||
4개 서비스 소스는 GitHub `KoreaExpressWayCorp` 저장소를 **git submodule**로 연결합니다.
|
||||
|
||||
| monorepo 경로 | GitHub | 브랜치 |
|
||||
|---------------|--------|--------|
|
||||
| `chatbotApp-chatbot2.0-agent` | https://github.com/KoreaExpressWayCorp/chatbotApp.git | `chatbot2.0-agent` |
|
||||
| `chatbotApi-chatbot2.0-agent` | https://github.com/KoreaExpressWayCorp/chatbotApi.git | `chatbot2.0-agent` |
|
||||
| `exAiChatBot-chatbot2.0-agent` | https://github.com/KoreaExpressWayCorp/exAiChatBot.git | `chatbot2.0-agent` |
|
||||
| `kakaoChatbotSkill-chatbot2.0-agent` | https://github.com/KoreaExpressWayCorp/kakaoChatbotSkill.git | `chatbot2.0-agent` |
|
||||
|
||||
최초 clone:
|
||||
|
||||
```bash
|
||||
git clone --recurse-submodules ssh://aidev@github.exdev.co.kr:2222/aidev/exAichatbot_agent.git
|
||||
```
|
||||
|
||||
GitHub 최신 반영:
|
||||
|
||||
```bash
|
||||
./git_fetch_all.sh # GitHub → 로컬 submodule fast-forward
|
||||
./git_fetch_all.sh --dry-run # 변경 예상만 확인
|
||||
./git_fetch_all.sh --init # submodule 최초 clone 포함
|
||||
```
|
||||
|
||||
RAG Docker compose(`docker-compose.server.yml`)는 submodule 밖 **`server-dev/docker-compose.rag.server.yml`** 에 두고, 기동 시 `exAiChatBot-chatbot2.0-agent/`로 복사합니다.
|
||||
|
||||
## 디렉터리
|
||||
|
||||
| 경로 (서버) | 용도 |
|
||||
@@ -19,13 +46,37 @@ bash /Users/aidev/dev/exAichatbot_agent/server-dev/setup-gitea.sh
|
||||
|
||||
Gitea(`https://github.exdev.co.kr`)에서 **`exAichatbot_agent`** 저장소 생성 (Initialize unchecked).
|
||||
|
||||
## 로컬 → Gitea push
|
||||
## 로컬 Mac → Gitea push → 서버 배포
|
||||
|
||||
개발 Mac에서 **한 번에** GitHub 최신 반영 · Gitea push · 서버 빌드·배포:
|
||||
|
||||
```bash
|
||||
./start-all-server.sh
|
||||
# = git_fetch_all (GitHub) → push-to-gitea → post-receive 배포 대기
|
||||
```
|
||||
|
||||
| 옵션 | 설명 |
|
||||
|------|------|
|
||||
| `--local` | 예전처럼 `local-dev/start-all.sh` 로컬 개발 모드 |
|
||||
| `--no-push` | Gitea push·원격 배포 생략 |
|
||||
| `--no-pull` | GitHub submodule fetch 생략 |
|
||||
| `--no-build` | Docker/Next 빌드 생략 (서버에서만 해당) |
|
||||
|
||||
수동 push만:
|
||||
|
||||
```bash
|
||||
./server-dev/push-to-gitea.sh
|
||||
./server-dev/push-to-gitea.sh --dry-run
|
||||
```
|
||||
|
||||
**main push 시 자동:** `post-receive` → `deploy-exAichatbot_agent.sh` → checkout + `git_fetch_all --init` → `start-all-server.sh --no-pull --no-push`
|
||||
|
||||
배포 로그: `/Volumes/ADATA/logs/deploy/exAichatbot_agent.log`
|
||||
|
||||
## 로컬 → Gitea push (수동)
|
||||
|
||||
```bash
|
||||
cd exChatbot_agent
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Agent 2.0 server deploy"
|
||||
|
||||
# Gitea (이 서버는 git@ 가 아닌 aidev@ 사용)
|
||||
git remote add origin ssh://aidev@github.exdev.co.kr:2222/aidev/exAichatbot_agent.git
|
||||
@@ -35,18 +86,16 @@ git push -u origin main
|
||||
# git@github.exdev.co.kr:aidev/exAichatbot_agent.git
|
||||
```
|
||||
|
||||
**main push 시 자동:** `post-receive` → `deploy-exAichatbot_agent.sh` → `stop-all-server.sh` → `start-all-server.sh`
|
||||
|
||||
배포 로그: `/Volumes/ADATA/logs/deploy/exAichatbot_agent.log`
|
||||
|
||||
## 수동 기동 / 중지 (서버)
|
||||
|
||||
```bash
|
||||
cd /Users/aidev/dev/exAichatbot_agent
|
||||
|
||||
./server-dev/stop-all-server.sh
|
||||
./server-dev/start-all-server.sh # 빌드 포함
|
||||
./server-dev/start-all-server.sh # Gitea checkout → GitHub submodule → 빌드 → 기동
|
||||
./server-dev/start-all-server.sh --no-build
|
||||
./server-dev/start-all-server.sh --no-pull # git 동기화 생략
|
||||
./server-dev/start-all-server.sh --no-push # Gitea push 생략 (서버 전용)
|
||||
```
|
||||
|
||||
## 스택 구성
|
||||
|
||||
Reference in New Issue
Block a user