deploy-to-azure
Redeploy the CopperHead server to Azure Container Apps using server-settings.azure.json as the config file.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Redeploy the CopperHead server to Azure Container Apps using server-settings.azure.json as the config file.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | deploy-to-azure |
| description | Redeploy the CopperHead server to Azure Container Apps using server-settings.azure.json as the config file. |
Use this skill when the user asks to deploy, redeploy, or update the Azure deployment.
Examples:
Rebuild the Docker image, upload server-settings.azure.json to the Azure File Share, and update the Container App. Report the deployed URL and admin console URL when finished.
az login)copperhead-server\tools\deploy-azure.ps1 existscopperhead-server\server-settings.azure.json exists (gitignored config for Azure)Verify Azure CLI is logged in.
az account show --query name -o tsv
Verify server-settings.azure.json exists.
Test-Path <project_root>\copperhead-server\server-settings.azure.json
Copy server-settings.azure.json over server-settings.json so it gets uploaded to the Azure File Share by the deploy script.
Set-Location <project_root>\copperhead-server
Copy-Item server-settings.azure.json server-settings.json -Force
Set the deployment environment variables. RESOURCE_GROUP MUST be set as a separate command — it cannot be chained with &&.
$env:RESOURCE_GROUP = "<resource-group>"
If the target resource group uses non-default names for the Azure Container Registry, storage account, location, or Container Apps environment, inspect the existing resources first and set the matching environment variables before deployment:
$env:LOCATION = "<location>"
$env:ACR_NAME = "<acr-name>"
$env:STORAGE_ACCOUNT = "<storage-account>"
$env:ENVIRONMENT = "<container-app-environment>"
Run the deploy script using pwsh (PowerShell 7). IMPORTANT: Do NOT use powershell — that launches Windows PowerShell 5.1 which lacks required features like Get-Date -AsUTC.
pwsh -ExecutionPolicy Bypass -File .\tools\deploy-azure.ps1
This script will:
The script runs for 2-3 minutes. Run it in async mode and monitor output with read_powershell.
After deployment, restore the original server-settings.json from git.
git checkout server-settings.json
Get the admin token. The token may be a fixed value from server-settings.azure.json (check the admin_token field there first). If not configured, download server-log.txt from the Azure File Share and extract the auto-generated token:
$key = az storage account keys list --account-name <storage-account> --resource-group <resource-group> --query "[0].value" -o tsv
az storage file download --share-name copperhead-config --account-name <storage-account> --account-key $key --path server-log.txt --dest "$env:TEMP\server-log.txt" --output none
$adminToken = Get-Content "$env:TEMP\server-log.txt" | Select-String "Admin token: (\w+)" | ForEach-Object { $_.Matches[0].Groups[1].Value } | Select-Object -Last 1
Report to the user using the Azure-hosted client URL (not GitHub Pages). The deployed server serves the client at its root URL:
https://<FQDN>/?server=wss%3A%2F%2F<FQDN>%2Fws%2Fhttps://<FQDN>/?server=wss%3A%2F%2F<FQDN>%2Fws%2F&admin=<TOKEN><FQDN> is the Container App FQDN from the deploy script outputpwsh not powershell to run the deploy script. powershell invokes Windows PowerShell 5.1 which does not support Get-Date -AsUTC and will fail.$env:RESOURCE_GROUP as a separate command, not chained with &&. PowerShell does not allow $env:VAR = "value" assignments in && chains.server-settings.azure.json for a configured admin_token, or tell the user to check the Azure Portal File Share for server-log.txt.copperhead-server\.Launch CopperHead bots with tools\launch_bots.py, including count, bot type, and difficulty.
Launch or relaunch the CopperHead server and client locally for testing and development.
Review and edit all status messages shown in the CopperHead client Play and Observe screens. Extracts messages to a markdown file for editing, then applies changes back to the code.