Communityコーディング&開発github.com

microsoft/python-appservice-deploy

Python(Flask/Django/FastAPI)コードをAzure App Service Linuxにデプロイします。

python-appservice-deploy とは?

このスキルは、Python製Webアプリケーション(Flask、Django、FastAPI、その他)をAzure App Service Linux(P0v3、Python 3.14)へデプロイするために特化したツールです。リソースグループ、App Serviceプラン、Web Appが存在しない場合は自動的に作成し、デプロイまでをワンストップで行います。MCPツール(mcp_azure_mcp_subscription_list、mcp_azure_mcp_group_list、mcp_azure_mcp_appservice、mcp_azure_mcp_azd)を活用し、ユーザーとの対話を最小限に抑えつつ、スマートなデフォルト設定を適用します。azure.yamlが存在する場合はazd経由、存在しない場合はaz CLIでデプロイを実行します。ただし、VNet、Key Vault、データベース等のインフラ構築やTerraform/BicepのようなIaCは対象外であり、それらはazure-prepareスキルに委譲します。デプロイ後のヘルスチェックやログ取得は禁止されており、App Serviceのウォームアップ時間を考慮して、静かにターンを終了します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/microsoft/azure-skills/tree/main/skills/python-appservice-deploy

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Python on Azure App Service — コードデプロイ

Python(Flask、Django、FastAPI、汎用)コードを Azure App Service Linux(P0v3、Python 3.14)にデプロイします。リソースグループ、プラン、Web Appが存在しない場合は作成します。VNet、Key Vault、データベース、IaCについては azure-prepare に委譲します。

使用するMCPツール: mcp_azure_mcp_subscription_list、mcp_azure_mcp_group_list、mcp_azure_mcp_appservice、mcp_azure_mcp_azd(azure.yaml が存在する場合)。

ワークフロー

  1. コンテキストを解決 — スマートデフォルト、最小限のプロンプト。 対話が必要なのはアプリ名のみ。RG(<app>-rg)、プラン(<app>-plan)、リージョン(現在の az デフォルトまたは eastus2)、サブスクリプションは自動推論されます。create-app.md §1 を参照。
  2. フレームワークを検出(補助的、ブロックしません)。detect.md を参照。
  3. パスを選択 — azure.yaml の host: appservice → deploy-azd.md へ;それ以外は deploy-azcli.md へ。
  4. RG → プラン(P0v3 --is-linux)→ Web App(--runtime "PYTHON:3.14")が存在することを確認。 一時的なARMエラーの場合は transient-retry.md に従います。create-app.md を参照。
  5. スタートアップを設定 — Flask/Django:なし(Oryxが自動検出)。FastAPI:常に python -m uvicorn main:app --host 0.0.0.0。その他:警告。startup-commands.md を参照。
  6. SCM_DO_BUILD_DURING_DEPLOYMENT=true を設定。
  7. デプロイ — azd deploy または az webapp deploy --type zip --track-status false を実行。
  8. 停止。デプロイ後メッセージを出力(post-deploy-message.md を参照)し、ターンを終了します。

厳格なルール

  • ⛔ デプロイ後の確認は行わない — デプロイが戻った後、az webapp log tail、curl、Invoke-WebRequest、またはヘルスプローブを実行しないでください。App Serviceのウォームアップには2〜3分かかります。静かなログや初期の5xxは障害ではありません。
  • ⛔ シェルセーフティ — --runtime には常に "PYTHON:3.14"(コロン)を使用してください。"PYTHON|3.14"(パイプはシェル演算子)は絶対に使用しないでください。
  • ⛔ az webapp up は絶対に使用しない — 非推奨です。ステップ7のコマンドを使用してください。
  • ✅ URL形式 — エンドポイントは https://... のURL形式で提示してください。

エラーハンドリング

症状→原因→修正の完全なマトリックスについては errors.md を参照してください。クイックトリアージ:プラン/アプリが見つからない → ステップ4を再実行;ポート8000でのコンテナpingタイムアウト → スタートアップを修正(ステップ5);デプロイ後の ModuleNotFoundError → ステップ6が実行されたことを確認し、再デプロイ。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

microsoft/airunway-aks-setup

Agent skill 'airunway-aks-setup' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/appinsights-instrumentation

Agent skill 'appinsights-instrumentation' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-ai

Agent skill 'azure-ai' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-aigateway

Agent skill 'azure-aigateway' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-app-onboard

Agent skill 'azure-app-onboard' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-app-onboard-prereq

Assess whether source code is ready to deploy to Azure — the check BEFORE infrastructure work. Evaluates build health, app completeness, dependencies and local services, stack compatibility, and deployment feasibility. Answers questions about what your app needs before it can be deployed — frameworks, dependencies, and configuration. Checks whether dependencies are compatible and identifies deployment blockers and unsupported frameworks. WHEN: \"evaluate my repo\", \"is my app ready to deploy\", \"what does my app need to deploy\", \"what do I need before deploying\", \"does my app need\", \"can I ship this to Azure\", \"scan my repo for issues\", \"is this app deployable\", \"check if my app is ready for Azure\", \"do I need a Dockerfile\", \"what's blocking my deployment\", \"are there any blockers\", \"are my dependencies compatible\", \"does Azure support my framework\", \"what needs to change before deploying\", \"check my app configuration\".

microsoft/azure-cloud-migrate

Agent skill 'azure-cloud-migrate' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-compliance

Agent skill 'azure-compliance' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-compute

Agent skill 'azure-compute' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-cost

Agent skill 'azure-cost' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-cost-optimization

Identify Azure cost savings from usage and spending data. USE FOR: optimize Azure costs, reduce Azure spending/expenses, analyze Azure costs, find cost savings, generate cost optimization report, identify orphaned resources to delete, rightsize VMs, reduce waste, optimize Redis costs, optimize storage costs, AKS cost analysis add-on, namespace cost, cost spike, anomaly, budget alert, AKS cost visibility. DO NOT USE FOR: deploying resources (use azure-deploy), general Azure diagnostics (use azure-diagnostics), security issues (use azure-security)

microsoft/azure-deploy

Agent skill 'azure-deploy' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-diagnostics

Agent skill 'azure-diagnostics' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-enterprise-infra-planner

Agent skill 'azure-enterprise-infra-planner' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-hosted-copilot-sdk

Build, deploy, and modify GitHub Copilot SDK apps on Azure. MANDATORY when codebase contains @github/copilot-sdk or CopilotClient in package.json. PREFER OVER azure-prepare when copilot-sdk markers detected. WHEN: copilot SDK, @github/copilot-sdk, copilot-powered app, build copilot app, prepare copilot app, add feature to copilot app, modify copilot app, BYOM, bring your own model, CopilotClient, createSession, sendAndWait, azd init copilot. DO NOT USE FOR: deploying already-prepared copilot-sdk apps (use azure-deploy), general web apps without copilot SDK (use azure-prepare), Copilot Extensions, Foundry agents (use microsoft-foundry).

microsoft/azure-kubernetes

Agent skill 'azure-kubernetes' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-kusto

Agent skill 'azure-kusto' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-messaging

Agent skill 'azure-messaging' from microsoft/azure-skills. Use when the task matches this skill's domain.

microsoft/azure-observability

Azure Observability Services including Azure Monitor, Application Insights, Log Analytics, Alerts, and Workbooks. Provides metrics, APM, distributed tracing, KQL queries, and interactive reports. USE FOR: Azure Monitor, Application Insights, Log Analytics, Alerts, Workbooks, metrics, APM, distributed tracing, KQL queries, interactive reports, observability, monitoring dashboards. DO NOT USE FOR: instrumenting apps with App Insights SDK (use appinsights-instrumentation), querying Kusto/ADX clusters (use azure-kusto), cost analysis (use azure-cost-optimization).

microsoft/azure-postgres

azure-postgres — an installable skill for AI agents.

関連スキル