| name | devops-deploy |
| description | Executes infrastructure deployment operations including Docker, CI/CD, AWS Lambda, SAM, Terraform, and GitHub Actions. Use when dockerizing applications, configuring CI/CD pipelines, or deploying to cloud infrastructure. |
| paths | ["**/Dockerfile*","**/k8s/**","**/infra/**","**/.github/workflows/**","**/template.yaml"] |
| effort | 3 |
| argument-hint | [target: docker|lambda|k8s|terraform|github-actions] |
| user-invocable | true |
| when_to_use | When dockerizing applications, configuring CI/CD pipelines, deploying to AWS, or setting up infrastructure as code |
| allowed-tools | Read, Glob, Grep, Write, Edit, Bash |
DevOps Deploy
Production checklist (always verify)
Docker: multi-stage Python
FROM python:3.11-slim AS builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt
FROM python:3.11-slim
WORKDIR /app
COPY --from=builder /root/.local /root/.local
COPY . .
ENV PATH=/root/.local/bin:$PATH
ENV PYTHONUNBUFFERED=1
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost:8000/health || exit 1
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
Docker Compose (local dev)
services:
app:
build: .
ports: ["8000:8000"]
environment:
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
volumes:
- .:/app
depends_on: [db, redis]
db:
image: postgres:15
environment:
POSTGRES_DB: app
POSTGRES_USER: app