{"id":16683649,"url":"https://github.com/yamachu/play-cloud-voicevox","last_synced_at":"2026-03-16T21:36:52.901Z","repository":{"id":213543273,"uuid":"734370861","full_name":"yamachu/play-cloud-voicevox","owner":"yamachu","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-21T16:36:03.000Z","size":513,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T08:28:24.512Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yamachu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-21T14:11:45.000Z","updated_at":"2023-12-22T02:04:24.000Z","dependencies_parsed_at":"2023-12-21T16:51:44.189Z","dependency_job_id":"31d09760-dfb4-4ab3-8c43-02961c70e0dc","html_url":"https://github.com/yamachu/play-cloud-voicevox","commit_stats":null,"previous_names":["yamachu/play-cloud-voicevox"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamachu%2Fplay-cloud-voicevox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamachu%2Fplay-cloud-voicevox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamachu%2Fplay-cloud-voicevox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yamachu%2Fplay-cloud-voicevox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yamachu","download_url":"https://codeload.github.com/yamachu/play-cloud-voicevox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243403240,"owners_count":20285380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T14:25:40.025Z","updated_at":"2025-12-28T21:58:53.442Z","avatar_url":"https://github.com/yamachu.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Play Cloud VOICEVOX\n\nAzure Container Apps で VOICEVOX ENGINE を動作させるサンプルリポジトリ。\n\n## Deploy ENGINE to Azure Container Apps\n\n### Requirements\n\n- Azure Subscription\n- Azure CLI\n- Terraform 1.6.0+\n\n### Login to Azure\n\n```sh\n$ az login\n```\n\n### Create Service Principal\n\n以下のページの手順に従って、サービスプリンシパルを作成します。\n\nhttps://learn.microsoft.com/ja-jp/azure/developer/terraform/get-started-windows-bash?tabs=bash\n\n以下のURLにアクセスし、契約しているサブスクリプションを調べます。\nページに表示されているサブスクリプションIDを控えておきます。\n\nhttps://portal.azure.com/#view/Microsoft_Azure_Billing/SubscriptionsBladeV2\n\n```sh\n$ az ad sp create-for-rbac --role Contributor --scopes /subscriptions/${SUBSCRIPTION_ID}\n```\n\n上記コマンドを実行すると、以下のようなJSONが出力されます。\n\n```json\n{\n  \"appId\": \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n  \"displayName\": \"some-app-name\",\n  \"password\": \"~~~~~~\",\n  \"tenant\": \"yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy\"\n}\n```\n\n### Set Environment Variables\n\n直前のフローで手に入れたJSONを使って、以下のように環境変数を設定します。\n\n```sh\nexport ARM_SUBSCRIPTION_ID=\"${SUBSCRIPTION_ID}\"\nexport ARM_TENANT_ID=\"${tenant}\"\nexport ARM_CLIENT_ID=\"${appId}\"\nexport ARM_CLIENT_SECRET=\"${password}\"\n```\n\n### Deploy\n\n以下のコマンドで Terraform を使用し、デプロイします。\n\n```sh\n$ terraform init\n$ terraform plan\n$ terraform apply\n```\n\n成功した後は、Azure Portal で Azure Container Apps が作成されていることを確認します。\n\n### Configure\n\n#### 認証\n\nデプロイされたコンテナアプリを Azure Portal で開き、`認証` のタブを開きます。\n\n![IDプロバイダーの追加](./docs/resources/add-id-provider.png)\n\n`IDプロバイダーを追加` をクリックし、`Microsoft` を選択し、画像のような設定をします。\n以下の設定では、現在のサブスクリプションに紐づいた人のみを認証するようになっています。\n\n![Azure AD 認証の設定](./docs/resources/microsoft-id-provider.png)\n\nこのままだとデプロイしたコンテナアプリと同一 origin の通信のみ許可になってしまうため、\n`許可される外部リダイレクト URL` に利用予定のあるドメインを追加します。\nこの設定は `認証の設定` の文字列の横の `編集` ボタンをクリックすることで行なえます。\n\n![外部リダイレクト URL の設定](./docs/resources/add-external-redirect-urls.png)\n\n### CORS\n\nAzure Container Apps が備えている認証基盤を通すため、CORS の設定が必要です。\n`CORS` のタブを開き、設定します。\n\n今回は簡単のため、すべての origin からのアクセスを許可するように設定します。\n実際の運用を行う場合は、適切な設定を行ってください。\n値には `*` を指定します。\nこれは `許可された配信元` と `許可されたメソッド` の両方で行います。\n許可されたヘッダー は自動的に設定されるため、設定する必要はありません。\n\n![CORS の設定](./docs/resources/cors-setting.png)\n\n## Deploy VOICEVOX Editor\n\nGitHub Actions を使用して、GitHub Pages に VOICEVOX Editor をデプロイします。\n\nSecrets and variables の Repository secrets に以下の環境変数を設定します。\n\n- `HOST`: Azure Container Apps のアプリケーションURL (例: `https://voicevox-cloud-app.~~~~.japaneast.azurecontainerapps.io`)\n\nDeploy Vite project with GitHub Pages の Action の Run workflow から、手動でデプロイを行います。\n\n## Login with AAD\n\nデプロイされた VOICEVOX Editor にアクセスし、`Login With AAD` をクリックしログインします。\n\nログイン後は Editor の URL の末尾に `/#/home` を追加し、利用します。\n\n## Notice\n\n不要なリソースは以下のコマンドで削除できます。\n\n```sh\n$ terraform destroy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyamachu%2Fplay-cloud-voicevox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyamachu%2Fplay-cloud-voicevox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyamachu%2Fplay-cloud-voicevox/lists"}