서버 배포 가이드 업데이트 — HTTPS + Gitea 도메인 연동
- trash.wxn.co.kr HTTPS (Let's Encrypt) 적용 - gitea.wxn.co.kr HTTPS 도메인 연동 - SSH 터널 방식 → HTTPS 도메인 직접 push 방식으로 변경 - DNS/SSL 설정 정보 추가 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,13 +7,15 @@
|
||||
| 서버 IP | `116.122.157.166` |
|
||||
| OS | Ubuntu 22.04.5 LTS |
|
||||
| SSH 접속 | `ssh wixon@116.122.157.166` (비밀번호: `1111`) |
|
||||
| 도메인 | `trash.wxn.co.kr` |
|
||||
| 웹 도메인 | `https://trash.wxn.co.kr` |
|
||||
| Gitea 도메인 | `https://gitea.wxn.co.kr` |
|
||||
| 호스팅 | 카페24 (qm391-0435.cafe24.com) |
|
||||
|
||||
## Gitea (Git 서버)
|
||||
|
||||
| 항목 | 값 |
|
||||
|------|------|
|
||||
| 외부 URL | `https://gitea.wxn.co.kr` |
|
||||
| 내부 URL | `http://localhost:3001` |
|
||||
| 컨테이너 | `gitea` (Docker) |
|
||||
| 관리자 계정 | `wixon` / `wixon1234!` |
|
||||
@@ -120,47 +122,25 @@ ssh wixon@116.122.157.166 "sudo systemctl status jongryangje-webhook"
|
||||
| Remote | URL | 용도 |
|
||||
|--------|-----|------|
|
||||
| `origin` | `github.com/wixon-associates/jongryangje` | GitHub (메인) |
|
||||
| `gitea` | `localhost:13001/wixon/jongryangje` (SSH 터널) | 서버 배포용 |
|
||||
| `gitea` | `gitea.wxn.co.kr/wixon/jongryangje` | 서버 배포용 (HTTPS) |
|
||||
|
||||
### SSH 터널 (Gitea push용)
|
||||
|
||||
외부에서 Gitea 3001 포트에 직접 접근할 수 없어 SSH 터널을 사용합니다.
|
||||
### push 방법
|
||||
|
||||
```bash
|
||||
# 터널 열기
|
||||
sshpass -p '1111' ssh -f -N -L 13001:localhost:3001 wixon@116.122.157.166
|
||||
|
||||
# push (터널 열린 상태에서)
|
||||
git push gitea main
|
||||
|
||||
# 또는 origin(GitHub)과 gitea 모두 push
|
||||
# GitHub + Gitea 동시 push (Gitea push 시 자동 배포)
|
||||
git push origin main && git push gitea main
|
||||
```
|
||||
|
||||
### push 자동화 스크립트
|
||||
## DNS / SSL 설정
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# push-all.sh — GitHub + Gitea 동시 push
|
||||
git push origin main
|
||||
# SSH 터널 확인/열기
|
||||
if ! nc -z localhost 13001 2>/dev/null; then
|
||||
sshpass -p '1111' ssh -f -N -L 13001:localhost:3001 wixon@116.122.157.166
|
||||
sleep 2
|
||||
fi
|
||||
git push gitea main
|
||||
echo "Push complete to GitHub + Gitea (auto-deploy triggered)"
|
||||
```
|
||||
| 도메인 | A 레코드 | SSL |
|
||||
|--------|----------|-----|
|
||||
| `trash.wxn.co.kr` | `116.122.157.166` | Let's Encrypt (자동 갱신) |
|
||||
| `gitea.wxn.co.kr` | `116.122.157.166` | Let's Encrypt (자동 갱신) |
|
||||
|
||||
## DNS 설정
|
||||
|
||||
`trash.wxn.co.kr` A 레코드를 `116.122.157.166`으로 설정 필요.
|
||||
|
||||
```
|
||||
trash.wxn.co.kr → A → 116.122.157.166
|
||||
```
|
||||
|
||||
DNS가 적용되면 `http://trash.wxn.co.kr`으로 접속 가능합니다.
|
||||
SSL 인증서 경로:
|
||||
- `/etc/letsencrypt/live/trash.wxn.co.kr/`
|
||||
- `/etc/letsencrypt/live/gitea.wxn.co.kr/`
|
||||
|
||||
## 서비스 관리
|
||||
|
||||
|
||||
Reference in New Issue
Block a user