# πŸš€ 배포 κ°€μ΄λ“œ (Full Stack) ``` git push β†’ Gitea Actions β”œβ”€ Web Docker build β†’ insurance.junggomoa.com (nginx) β”œβ”€ API Docker build β†’ api.insurance.junggomoa.com (Fastify) └─ Postgres StatefulSet (10Gi PVC) ``` ## β˜‘ ν•œ 번만 μ„€μ • (Gitea Repo Secrets) [https://git.junggomoa.com/chpark/insurance/settings/actions/secrets](https://git.junggomoa.com/chpark/insurance/settings/actions/secrets) | Secret | κ°’ | λΉ„κ³  | |---|---|---| | `REGISTRY_USER` | `chpark` | Gitea μ‚¬μš©μžλͺ… | | `REGISTRY_TOKEN` | (Gitea β†’ Settings β†’ Applications β†’ Generate Token, `write:package` 체크) | | | `KUBE_CONFIG` | μ„œλ²„μ—μ„œ μƒμ„±ν•œ base64 kubeconfig | μ•„λž˜ 슀크립트 μ°Έκ³  | | `POSTGRES_PASSWORD` | μž„μ˜μ˜ κ°•ν•œ λΉ„λ°€λ²ˆν˜Έ (예: `openssl rand -hex 24`) | DB λΉ„λ²ˆ | | `JWT_SECRET` | μž„μ˜μ˜ 32자 이상 랜덀 λ¬Έμžμ—΄ (`openssl rand -hex 32`) | JWT μ„œλͺ…ν‚€ | | `INGRESS_MODE` | `ingress` λ˜λŠ” `ingressroute` | Traefik 버전 | ## πŸ”‘ kubeconfig 생성 (μ„œλ²„μ—μ„œ ν•œ 번만) ```bash ssh chpark@183.99.177.40 kubectl create namespace insurance 2>/dev/null || true kubectl -n insurance create serviceaccount gitea-deployer kubectl create clusterrolebinding gitea-deployer \ --clusterrole=cluster-admin \ --serviceaccount=insurance:gitea-deployer TOKEN=$(kubectl -n insurance create token gitea-deployer --duration=8760h) SERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}') CA=$(kubectl config view --minify --raw -o jsonpath='{.clusters[0].cluster.certificate-authority-data}') cat > /tmp/gitea-kubeconfig <