[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-46b6e831-79e8-4581-858b-9ea0531cc2dd":3,"$f7Y0ypP6vnPI35UT21y4hWPQCgJoyBNF8qoDlIiickWQ":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"46b6e831-79e8-4581-858b-9ea0531cc2dd","devops-deploy","DevOps和应用程序部署——Docker、GitHub Actions的CI\u002FCD、AWS Lambda、SAM、Terraform、基础设施即代码和监控。","cat_coding_devops","mod_coding","sickn33,coding","---\nname: devops-deploy\ndescription: \"DevOps e deploy de aplicacoes — Docker, CI\u002FCD com GitHub Actions, AWS Lambda, SAM, Terraform, infraestrutura como codigo e monitoramento.\"\nrisk: critical\nsource: community\ndate_added: '2026-03-06'\nauthor: renat\ntags:\n- devops\n- docker\n- ci-cd\n- aws\n- terraform\n- github-actions\ntools:\n- claude-code\n- antigravity\n- cursor\n- gemini-cli\n- codex-cli\n---\n\n# DEVOPS-DEPLOY — Da Ideia para Producao\n\n## Overview\n\nDevOps e deploy de aplicacoes — Docker, CI\u002FCD com GitHub Actions, AWS Lambda, SAM, Terraform, infraestrutura como codigo e monitoramento. Ativar para: dockerizar aplicacao, configurar pipeline CI\u002FCD, deploy na AWS, Lambda, ECS, configurar GitHub Actions, Terraform, rollback, blue-green deploy, health checks, alertas.\n\n## When to Use This Skill\n\n- When you need specialized assistance with this domain\n\n## Do Not Use This Skill When\n\n- The task is unrelated to devops deploy\n- A simpler, more specific tool can handle the request\n- The user needs general-purpose assistance without domain expertise\n\n## How It Works\n\n> \"Move fast and don't break things.\" — Engenharia de elite nao e lenta.\n> E rapida e confiavel ao mesmo tempo.\n\n---\n\n## Dockerfile Otimizado (Python)\n\n```dockerfile\nFROM python:3.11-slim AS builder\nWORKDIR \u002Fapp\nCOPY requirements.txt .\nRUN pip install --no-cache-dir --user -r requirements.txt\n\nFROM python:3.11-slim\nWORKDIR \u002Fapp\nCOPY --from=builder \u002Froot\u002F.local \u002Froot\u002F.local\nCOPY . .\nENV PATH=\u002Froot\u002F.local\u002Fbin:$PATH\nENV PYTHONUNBUFFERED=1\nEXPOSE 8000\nHEALTHCHECK --interval=30s --timeout=3s CMD curl -f http:\u002F\u002Flocalhost:8000\u002Fhealth || exit 1\nCMD [\"uvicorn\", \"main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"8000\"]\n```\n\n## Docker Compose (Dev Local)\n\n```yaml\nversion: \"3.9\"\nservices:\n  app:\n    build: .\n    ports: [\"8000:8000\"]\n    environment:\n      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}\n    volumes:\n      - .:\u002Fapp\n    depends_on: [db, redis]\n  db:\n    image: postgres:15\n    environment:\n      POSTGRES_DB: auri\n      POSTGRES_USER: auri\n      POSTGRES_PASSWORD: ${DB_PASSWORD}\n    volumes:\n      - pgdata:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\n  redis:\n    image: redis:7-alpine\nvolumes:\n  pgdata:\n```\n\n---\n\n## Sam Template (Serverless)\n\n```yaml\n\n## Template.Yaml\n\nAWSTemplateFormatVersion: '2010-09-09'\nTransform: AWS::Serverless-2016-10-31\n\nGlobals:\n  Function:\n    Timeout: 30\n    Runtime: python3.11\n    Environment:\n      Variables:\n        ANTHROPIC_API_KEY: !Ref AnthropicApiKey\n        DYNAMODB_TABLE: !Ref AuriTable\n\nResources:\n  AuriFunction:\n    Type: AWS::Serverless::Function\n    Properties:\n      CodeUri: src\u002F\n      Handler: lambda_function.handler\n      MemorySize: 512\n      Policies:\n        - DynamoDBCrudPolicy:\n            TableName: !Ref AuriTable\n\n  AuriTable:\n    Type: AWS::DynamoDB::Table\n    Properties:\n      TableName: auri-users\n      BillingMode: PAY_PER_REQUEST\n      AttributeDefinitions:\n        - AttributeName: userId\n          AttributeType: S\n      KeySchema:\n        - AttributeName: userId\n          KeyType: HASH\n      TimeToLiveSpecification:\n        AttributeName: ttl\n        Enabled: true\n```\n\n## Deploy Commands\n\n```bash\n\n## Build E Deploy\n\nsam build\nsam deploy --guided  # primeira vez\nsam deploy           # deploys seguintes\n\n## Deploy Rapido (Sem Confirmacao)\n\nsam deploy --no-confirm-changeset --no-fail-on-empty-changeset\n\n## Ver Logs Em Tempo Real\n\nsam logs -n AuriFunction --tail\n\n## Deletar Stack\n\nsam delete\n```\n\n---\n\n## .Github\u002FWorkflows\u002FDeploy.Yml\n\nname: Deploy Auri\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-python@v5\n        with: { python-version: \"3.11\" }\n      - run: pip install -r requirements.txt\n      - run: pytest tests\u002F -v --cov=src --cov-report=xml\n      - uses: codecov\u002Fcodecov-action@v4\n\n  security:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - run: pip install bandit safety\n      - run: bandit -r src\u002F -ll\n      - run: safety check -r requirements.txt\n\n  deploy:\n    needs: [test, security]\n    if: github.ref == 'refs\u002Fheads\u002Fmain'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: aws-actions\u002Fsetup-sam@v2\n      - uses: aws-actions\u002Fconfigure-aws-credentials@v4\n        with:\n          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n          aws-region: us-east-1\n      - run: sam build\n      - run: sam deploy --no-confirm-changeset\n      - name: Notify Telegram on Success\n        run: |\n          curl -s -X POST \"https:\u002F\u002Fapi.telegram.org\u002Fbot${{ secrets.TELEGRAM_BOT_TOKEN }}\u002FsendMessage\" \\\n            -d \"chat_id=${{ secrets.TELEGRAM_CHAT_ID }}\" \\\n            -d \"text=Auri deployed successfully! Commit: ${{ github.sha }}\"\n```\n\n---\n\n## Health Check Endpoint\n\n```python\nfrom fastapi import FastAPI\nimport time, os\n\napp = FastAPI()\nSTART_TIME = time.time()\n\n@app.get(\"\u002Fhealth\")\nasync def health():\n    return {\n        \"status\": \"healthy\",\n        \"uptime_seconds\": time.time() - START_TIME,\n        \"version\": os.environ.get(\"APP_VERSION\", \"unknown\"),\n        \"environment\": os.environ.get(\"ENV\", \"production\")\n    }\n```\n\n## Alertas Cloudwatch\n\n```python\nimport boto3\n\ndef create_error_alarm(function_name: str, sns_topic_arn: str):\n    cw = boto3.client(\"cloudwatch\")\n    cw.put_metric_alarm(\n        AlarmName=f\"{function_name}-errors\",\n        MetricName=\"Errors\",\n        Namespace=\"AWS\u002FLambda\",\n        Dimensions=[{\"Name\": \"FunctionName\", \"Value\": function_name}],\n        Period=300,\n        EvaluationPeriods=1,\n        Threshold=5,\n        ComparisonOperator=\"GreaterThanThreshold\",\n        AlarmActions=[sns_topic_arn],\n        TreatMissingData=\"notBreaching\"\n    )\n```\n\n---\n\n## 5. Checklist De Producao\n\n- [ ] Variaveis de ambiente via Secrets Manager (nunca hardcoded)\n- [ ] Health check endpoint respondendo\n- [ ] Logs estruturados (JSON) com request_id\n- [ ] Rate limiting configurado\n- [ ] CORS restrito a dominios autorizados\n- [ ] DynamoDB com backup automatico ativado\n- [ ] Lambda com timeout adequado (10-30s)\n- [ ] CloudWatch alarmes para erros e latencia\n- [ ] Rollback plan documentado\n- [ ] Load test antes do lancamento\n\n---\n\n## 6. Comandos\n\n| Comando | Acao |\n|---------|------|\n| `\u002Fdocker-setup` | Dockeriza a aplicacao |\n| `\u002Fsam-deploy` | Deploy completo na AWS Lambda |\n| `\u002Fci-cd-setup` | Configura GitHub Actions pipeline |\n| `\u002Fmonitoring-setup` | Configura CloudWatch e alertas |\n| `\u002Fproduction-checklist` | Roda checklist pre-lancamento |\n| `\u002Frollback` | Plano de rollback para versao anterior |\n\n## Best Practices\n\n- Provide clear, specific context about your project and requirements\n- Review all suggestions before applying them to production code\n- Combine with other complementary skills for comprehensive analysis\n\n## Common Pitfalls\n\n- Using this skill for tasks outside its domain expertise\n- Applying recommendations without understanding your specific context\n- Not providing enough project context for accurate analysis\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,152,623,"2026-05-16 13:15:20",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"编程开发","coding","mdi-code-braces","代码生成、调试、审查，提升开发效率",2,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"DevOps","devops","mdi-cog-outline","CI\u002FCD、容器化、部署运维",3,162,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"4eed90e5-00aa-433f-998c-4bad581871dd","1.0.0","devops-deploy.zip",3463,"uploads\u002Fskills\u002F46b6e831-79e8-4581-858b-9ea0531cc2dd\u002Fdevops-deploy.zip","d6e6b19f573ebb71ebd3b5d28c984dc55ad6d8bc647d19868d05f22a66e56733","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":7412}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]