From f37f66a9d45a7958c17aca651b4201c8617aa876 Mon Sep 17 00:00:00 2001 From: AutonetSellCar Deploy Date: Sat, 3 Jan 2026 09:44:35 +0900 Subject: [PATCH] Add deployment workflow section to CLAUDE.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add staging/production server URLs - Add step-by-step deployment order (staging first!) - Add Git repository info - Add staging and production deployment commands πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- CLAUDE.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index ff97d12..4357b12 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -61,6 +61,79 @@ ssh server2 "docker stop autonet-frontend 2>/dev/null; docker rm autonet-fronten --- +## πŸš€ 배포 μ›Œν¬ν”Œλ‘œμš° (ν•„μˆ˜!) + +### μ„œλ²„ ꡬ성 + +| ν™˜κ²½ | URL | μš©λ„ | +|------|-----|------| +| **μŠ€ν…Œμ΄μ§•** | https://staging.autonetsellcar.com | ν…ŒμŠ€νŠΈμš© (λ¨Όμ € 배포) | +| **ν”„λ‘œλ•μ…˜** | https://autonetsellcar.com | μ‹€μ„œλΉ„μŠ€ (ν…ŒμŠ€νŠΈ ν›„ 배포) | + +### 배포 μˆœμ„œ (λ°˜λ“œμ‹œ μ€€μˆ˜!) + +``` +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ 1. 개발 PCμ—μ„œ μ½”λ“œ μˆ˜μ • β”‚ +β”‚ D:\Workspace\claudeCode\AutonetSellCar.com\ β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ 2. Git 컀밋 및 ν‘Έμ‹œ β”‚ +β”‚ git add . β”‚ +β”‚ git commit -m "λ³€κ²½ λ‚΄μš©" β”‚ +β”‚ git push staging main β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ 3. μŠ€ν…Œμ΄μ§• μ„œλ²„ 배포 β”‚ +β”‚ - /opt/autonet/staging/frontend μ—μ„œ λΉŒλ“œ β”‚ +β”‚ - https://staging.autonetsellcar.com μ—μ„œ ν…ŒμŠ€νŠΈ β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + ↓ +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ 4. μŠ€ν…Œμ΄μ§•μ—μ„œ μΆ©λΆ„νžˆ ν…ŒμŠ€νŠΈ ν›„ β†’ ν”„λ‘œλ•μ…˜ 배포 β”‚ +β”‚ - /opt/autonet/production/frontend μ—μ„œ λΉŒλ“œ β”‚ +β”‚ - https://autonetsellcar.com 확인 β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` + +### Git μ €μž₯μ†Œ 정보 + +| ν•­λͺ© | κ°’ | +|------|-----| +| 원격 μ €μž₯μ†Œ | `ssh://damon@192.168.0.202/opt/autonet/git/autonet.git` | +| 브랜치 | `main` | +| 원격 이름 | `staging` | + +### μŠ€ν…Œμ΄μ§• 배포 λͺ…λ Ήμ–΄ + +```bash +# 1. μ†ŒμŠ€ 동기화 +scp -r frontend/src damon@192.168.0.202:/opt/autonet/staging/frontend/ + +# 2. .env.production μ„€μ • +ssh server2 "echo 'NEXT_PUBLIC_API_URL=https://staging.autonetsellcar.com' > /opt/autonet/staging/frontend/.env.production" + +# 3. Docker λΉŒλ“œ 및 μž¬μ‹œμž‘ +ssh server2 "cd /opt/autonet/staging/frontend && docker build --no-cache -t staging-frontend . && docker stop autonet-frontend-staging; docker rm autonet-frontend-staging; docker run -d --name autonet-frontend-staging --restart unless-stopped -p 3001:3000 staging-frontend" +``` + +### ν”„λ‘œλ•μ…˜ 배포 λͺ…λ Ήμ–΄ + +```bash +# 1. μ†ŒμŠ€ 동기화 +scp -r frontend/src damon@192.168.0.202:/opt/autonet/production/frontend/ + +# 2. .env.production μ„€μ • (HTTPS ν•„μˆ˜!) +ssh server2 "echo 'NEXT_PUBLIC_API_URL=https://autonetsellcar.com' > /opt/autonet/production/frontend/.env.production" + +# 3. Docker λΉŒλ“œ 및 μž¬μ‹œμž‘ +ssh server2 "cd /opt/autonet/production/frontend && docker build --no-cache -t production-frontend . && docker stop autonet-frontend; docker rm autonet-frontend; docker run -d --name autonet-frontend --restart unless-stopped -p 3000:3000 production-frontend" +``` + +--- + ## 1. ν”„λ‘œμ νŠΈ ꡬ쑰 ```