Skip to content

Commit b86ef7c

Browse files
committed
docs: update CLAUDE.md with deployment documentation
- Document all CI/CD workflows with triggers and purposes - Add Docker image pull instructions for GHCR - Document environment-specific deployment commands - Add release process documentation - Document rollback procedures - List required secrets for deployment - Document GitHub environment configuration
1 parent 676857f commit b86ef7c

1 file changed

Lines changed: 68 additions & 2 deletions

File tree

.claude/CLAUDE.md

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,23 @@ pytest --pdb # Debug on failure
129129

130130
## CI/CD
131131

132-
GitHub Actions (`.github/workflows/ci.yml`): Lint → Security → Tests → Build → Docker
132+
GitHub Actions workflows in `.github/workflows/`:
133+
134+
| Workflow | Trigger | Purpose |
135+
|----------|---------|---------|
136+
| `ci.yml` | Push/PR | Lint → Security → Tests → Build → Docker |
137+
| `release.yml` | Tag `v*.*.*` | Build, push to GHCR, create GitHub release |
138+
| `deploy-staging.yml` | Push to `develop` | Deploy to staging environment |
139+
| `deploy-production.yml` | Release published | Deploy to production (with approval) |
140+
| `rollback.yml` | Manual | Rollback to previous version |
141+
| `version-bump.yml` | Manual | Bump version and create tag |
133142

134143
### CI Notes
135144

136145
- Uses **`uv`** instead of pip (10-100x faster dependency resolution)
137146
- Set `UV_SYSTEM_PYTHON=1` environment variable for system Python installation
138147
- Docker build requires disk cleanup step (removes .NET SDK, Android SDK, GHC, CodeQL to free ~30GB)
139-
- MyPy module overrides in `pyproject.toml` for `app.error_handlers` and `app.retry` to handle environment differences
148+
- Docker images pushed to GitHub Container Registry (`ghcr.io`)
140149

141150
### CI Timing
142151

@@ -148,6 +157,63 @@ GitHub Actions (`.github/workflows/ci.yml`): Lint → Security → Tests → Bui
148157
| Build Check | ~12s |
149158
| Docker Build | ~25m |
150159

160+
## Deployment
161+
162+
### Docker Images
163+
164+
Images are published to GitHub Container Registry:
165+
166+
```bash
167+
# Pull latest
168+
docker pull ghcr.io/sakeeb91/arctic-text2sql-agent:latest
169+
170+
# Pull specific version
171+
docker pull ghcr.io/sakeeb91/arctic-text2sql-agent:1.0.0
172+
173+
# Pull by commit SHA
174+
docker pull ghcr.io/sakeeb91/arctic-text2sql-agent:sha-abc1234
175+
```
176+
177+
### Environment Deployment
178+
179+
```bash
180+
# Staging
181+
docker-compose -f docker-compose.yml -f docker-compose.staging.yml up -d
182+
183+
# Production
184+
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
185+
```
186+
187+
### Release Process
188+
189+
1. **Version Bump**: Run `version-bump.yml` workflow (patch/minor/major)
190+
2. **Auto-Release**: Tag push triggers `release.yml` → builds image → creates GitHub release
191+
3. **Production Deploy**: Release publish triggers `deploy-production.yml` (requires approval)
192+
193+
### Rollback
194+
195+
Use the `rollback.yml` workflow:
196+
- Select environment (staging/production)
197+
- Specify target version (e.g., `v1.0.0` or `sha-abc1234`)
198+
- Provide reason for rollback
199+
- Production rollbacks require approval
200+
201+
### Required Secrets
202+
203+
| Secret | Description |
204+
|--------|-------------|
205+
| `GITHUB_TOKEN` | Auto-provided, used for GHCR push |
206+
| `DATABASE_URL` | Production database connection |
207+
| `HUGGINGFACE_TOKEN` | Model download access |
208+
| `SECRET_KEY` | JWT signing key |
209+
210+
### GitHub Environments
211+
212+
Configure these environments in repository settings:
213+
- `staging` - Auto-deploy from develop branch
214+
- `production` - Manual approval required
215+
- `production-approval` - Approval gate for production deploys
216+
151217
## Critical Implementation Notes
152218

153219
### Slowapi Rate Limiting

0 commit comments

Comments
 (0)