romankovsv/claude-code-python-devops-mlops/deployment-patterns

Claude Code and agent skill by romankovsv/claude-code-python-devops-mlops

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies for Python applications.

Install

npx vskill@latest install romankovsv/claude-code-python-devops-mlops/deployment-patterns

SKILL.md

The same SKILL.md was published earlier as izangi2714/claude-code-python-stack/deployment-patterns.

Deployment Patterns for Python

Production deployment workflows and CI/CD best practices.

When to Activate

  • Setting up CI/CD pipelines for Python projects
  • Dockerizing Python/Django/FastAPI applications
  • Planning deployment strategy
  • Implementing health checks and readiness probes

Deployment Strategies

StrategyUse WhenProsCons
RollingStandard deploysZero downtimeTwo versions run simultaneously
Blue-GreenCritical servicesInstant rollback2x infrastructure
CanaryRisky changesCatches issues earlyRequires traffic splitting

Python Dockerfile

dockerfile
FROM python:3.12-slim AS builder
WORKDIR /app
RUN pip install --no-cache-dir uv
COPY requirements.txt .
RUN uv pip install --system --no-cache -r requirements.txt
FROM python:3.12-slim AS runner
WORKDIR /app
RUN useradd -r -u 1001 appuser
USER appuser
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
COPY . .
ENV PYTHONUNBUFFERED=1
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=3s CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health/')" || exit 1
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "4"]

GitHub Actions (Python)

yaml
name: CI/CD
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install -r requirements.txt -r requirements-dev.txt
- run: ruff check . && black . --check && mypy .
- run: pytest --cov=src --cov-report=xml
- run: bandit -r src/ && pip-audit
build:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.sha }}

Health Check Endpoint (FastAPI)

python
from fastapi import FastAPI
from datetime import datetime
app = FastAPI()
@app.get("/health")
async def health():
return {"status": "ok", "timestamp": datetime.utcnow().isoformat()}
@app.get("/health/detailed")
async def health_detailed():
checks = {
"database": await check_database(),
"redis": await check_redis(),
}
all_healthy = all(c["status"] == "ok" for c in checks.values())
return {"status": "ok" if all_healthy else "degraded", "checks": checks}

Production Readiness Checklist

  • [ ] All tests pass (unit, integration, E2E)
  • [ ] No hardcoded secrets
  • [ ] Health check endpoint works
  • [ ] Docker image builds reproducibly
  • [ ] Environment variables validated at startup
  • [ ] Resource limits set
  • [ ] SSL/TLS enabled
  • [ ] Alerts configured
  • [ ] Log aggregation set up
  • [ ] Rollback plan documented
  • [ ] Dependencies scanned for CVEs

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/romankovsv/claude-code-python-devops-mlops/deployment-patterns/badge)](https://verified-skill.com/skills/romankovsv/claude-code-python-devops-mlops/deployment-patterns)

Something wrong with this skill or its page? Tell us.