From e5a918f1e52e00e17ba3e04e177951b2a64a0087 Mon Sep 17 00:00:00 2001 From: kappa Date: Sat, 28 Mar 2026 00:49:18 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20gitea=20=EB=8F=84=EB=A9=94=EC=9D=B8=20?= =?UTF-8?q?=EC=9D=B4=EC=A0=84=20=EC=A0=95=EB=A6=AC=20(anvil.it.com=20?= =?UTF-8?q?=E2=86=92=20inouter.com)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/gitea.md | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/services/gitea.md b/services/gitea.md index 08a0999..0083934 100644 --- a/services/gitea.md +++ b/services/gitea.md @@ -1,6 +1,6 @@ --- title: Gitea 서버 및 CI/CD -updated: 2026-03-27 +updated: 2026-03-28 --- ## 서버 @@ -15,7 +15,7 @@ K3s 클러스터에서 Helm 차트(gitea/gitea 12.5.0)로 운영. 네임스페 - R2 버킷: `gitea-storage` (APAC), Vault `secret/cloud/r2-gitea`, K8s Secret `gitea-r2` - 시크릿: Vault `secret/apps/gitea` - Deployment strategy: Recreate (RWO PVC 충돌 방지) -- 메일: Mailgun SMTP (`gitea@anvil.it.com`, 도메인 `anvil.it.com`) +- 메일: Mailgun SMTP (`gitea@inouter.com`, 도메인 `inouter.com`), FROM: `noreply@inouter.com` ### Helm 관리 @@ -24,7 +24,7 @@ K3s 클러스터에서 Helm 차트(gitea/gitea 12.5.0)로 운영. 네임스페 ~/k8s/gitea/values.yaml # 업그레이드 -helm upgrade gitea gitea-charts/gitea -n gitea -f ~/k8s/gitea/values.yaml +helm upgrade gitea gitea/gitea -n gitea -f ~/k8s/gitea/values.yaml ``` ### 이전 (Synology) @@ -54,10 +54,30 @@ Gitea는 iron-kr에서 **iron-git** (ID 5584382)으로 분리. 이유: iron-kr ## Act Runner Gitea Act Runner는 [[infra-hosts|incus-jp1]]의 gitea-runner 컨테이너에서 실행 (act_runner daemon, systemd 서비스). +- 라벨: `ubuntu-latest`, `ubuntu-22.04`, `ubuntu-20.04` +- 설정: `/root/.runner` (address: `https://gitea.inouter.com`) +- Docker config: `/root/.docker/config.json` (레지스트리 인증) +- `/etc/hosts`: `192.168.9.53 gitea.inouter.com` (직접 접근) ## CI/CD 배포 -On push to main branch, uses appleboy/ssh-action to SSH into incus-kr1 and execute 'git pull && docker compose up -d --build' +ArgoCD로 배포 관리. CI workflow는 Docker 이미지 빌드+푸시만 수행하고, ArgoCD가 `k8s/` 매니페스트 변경을 감지하여 자동 배포. + +| repo | ArgoCD 앱 | workflow | 비고 | +|------|-----------|----------|------| +| namecheap-api | namecheap-api | docker.yaml | build+push | +| vultr-api | vultr-api | build.yaml + ci.yml | build+push | +| bunnycdn-mcp | bunnycdn-mcp | ci.yml | build+push | +| cf-bouncer-manager | cf-bouncer-manager | build.yaml | build+push | + +### CI workflow 공통 패턴 + +```yaml +env: + REGISTRY: gitea.inouter.com + IMAGE_NAME: ${{ gitea.repository }} +# secrets.REGISTRY_TOKEN 사용 (각 repo Actions secrets에 설정) +``` ## 백업 @@ -66,6 +86,20 @@ K8s CronJob `gitea-backup` (매일 03:00 UTC): - 7일 보존, Longhorn PVC 10Gi - 매니페스트: `~/k8s/gitea/backup-cronjob.yaml` +## 도메인 이전 (2026-03-28) + +`gitea.anvil.it.com` → `gitea.inouter.com` 완전 교체. + +변경 항목: +- DNS: Cloudflare CNAME → iron-git.b-cdn.net + BunnyCDN Free SSL +- K8s: HTTPRoute, Helm values (DOMAIN, ROOT_URL), CoreDNS 헤어핀 rewrite +- ArgoCD: 4개 앱 repoURL + 8개 repo secret +- Gitea Runner: `.runner`, `.docker/config.json`, `/etc/hosts` +- Mailgun: `gitea@anvil.it.com` → `gitea@inouter.com` credential 교체 +- 4개 repo CI workflow 이미지 경로 수정 +- 컨테이너 이미지 경로: 5개 Deployment +- 로컬 git remote 6개, Obsidian 문서 7개, CLAUDE.md, Vault secret + ## 트러블슈팅 ### 웹 로그인 안 될 때 비밀번호 리셋