refactor: move deploy scripts into .claude/skills/deploy/
- Added deploy skill (SKILL.md) with dev/prod instructions - Moved deploy_prod.sh, deploy_dev.sh, dev_deploy.sh, speed_take.sh - Updated settings.local.json: new script paths, git merge/push permissions, auto-deploy hook on merge to master - Removed dev_deploy.sh and speed_take.sh from .gitignore Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
40
.claude/skills/deploy/SKILL.md
Normal file
40
.claude/skills/deploy/SKILL.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: deploy
|
||||
description: Use when deploying this project to dev or prod environments, or when asked to run, ship, release, or push to a server.
|
||||
---
|
||||
|
||||
# Deploy
|
||||
|
||||
## Environments
|
||||
|
||||
### Dev (`/deploy dev`)
|
||||
```bash
|
||||
bash .claude/skills/deploy/deploy_dev.sh
|
||||
```
|
||||
Builds and restarts the service on the dev server (ubuntu).
|
||||
|
||||
### Prod (`/deploy prod`)
|
||||
Prod deploy requires being on `master`. Steps:
|
||||
1. Ensure all changes are committed and pushed to `master`
|
||||
2. Run:
|
||||
```bash
|
||||
bash .claude/skills/deploy/deploy_prod.sh
|
||||
```
|
||||
|
||||
`deploy_prod.sh` will:
|
||||
- Pull latest code on ubuntu build host
|
||||
- Build `linux/amd64` Docker image and push to registry
|
||||
- SSH into ECS: stop old container, start new one with `-env=prod`
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Target | Command | Branch required |
|
||||
|--------|---------|-----------------|
|
||||
| Dev | `bash .claude/skills/deploy/deploy_dev.sh` | any |
|
||||
| Prod | `bash .claude/skills/deploy/deploy_prod.sh` | `master` or `main` |
|
||||
|
||||
## Common Mistakes
|
||||
|
||||
- Running `deploy_prod.sh` on a feature branch → script guards against this (exits with error)
|
||||
- Forgetting to merge/push before deploy → ubuntu build host pulls from remote, so local-only commits won't be included
|
||||
- Prod logs go to `/app/logs/app.log` inside the container, not stdout — use `docker exec doc_ai tail -f /app/logs/app.log` on ECS to tail them
|
||||
Reference in New Issue
Block a user