コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Firebase App Hosting
plat_web
Firebase App Hosting は、動的ウェブアプリの開発とデプロイを効率化します。GitHub との統合と、Authentication、Cloud Firestore、Firebase AI Logic などの他の Firebase プロダクトとの統合が可能です。App Hosting には、Next.js と Angular の事前構成済みサポートが組み込まれており、さまざまな一般的なウェブ フレームワークも幅広くサポートされています。
始めましょう
主な機能
GitHub インテグレーション |
アプリの新しいバージョンをロールアウトするために必要なのは、git commit だけです。App Hosting は、特定のブランチに push するたびに自動的にデプロイできます。 |
Google Cloud でバックアップされています |
App Hosting は Google Cloud 利用規約を使用し、信頼できる Google Cloud サービスにアプリをデプロイします。アプリは Cloud Build でビルドされ、Cloud Run で提供され、Cloud CDN でキャッシュに保存されます。Cloud Secret Manager などの統合サービスにより、API キーが安全に保管されます。 |
AI を活用した機能を大規模にリリースする |
Gemini を使用する AI サンプルから始めましょう。Cloud Secret Manager で API エンドポイントの API キーを保護し、App Hosting のストリーミング サポートを活用して、生成 AI 機能をアプリに追加しても初期読み込み時間を短縮します。 |
Firebase コンソールの統合 |
Firebase コンソールでビルドとロールアウトをモニタリングして、常に状況を把握します。Firebase コンソールからログと指標にアクセスし、カスタム ドメインを追加して、ロールアウトを手動でトリガーします。 |
仕組み
- Firebase コンソールまたは Firebase CLI を使用して、Firebase GitHub アプリをリポジトリに承認してインストールします。
- Firebase コンソールまたは Firebase CLI で、Firebase App Hosting バックエンドを作成し、継続的デプロイ用のリポジトリとライブブランチを作成します。App Hosting は、変更がターゲット ブランチに push されたときに、トラフィックの 100% にすぐにロールアウトするように、バックエンドのデフォルトのロールアウト ポリシーを作成します。
- ライブブランチに commit が push されると、Google Cloud Developer Connect は Firebase App Hosting にイベントを送信します。
- このイベントに応答して、Firebase App Hosting はリポジトリに接続されているバックエンドの新しいビルドを作成します。
- まず、Firebase App Hosting は commit の新しい Cloud Build ビルドを作成します。このジョブでは、Google Cloud Buildpack がアプリケーションで使用されているフレームワークを特定し、アプリケーションに適したコンテナと構成(環境変数、シークレット、最小インスタンス数または最大インスタンス数、同時実行メモリ、CPU、VPC 構成など)を作成します。詳細については、App Hosting のビルドプロセスをご覧ください。
- Cloud Build ジョブが完了すると、コンテナは Firebase App Hosting 専用の Artifact Registry リポジトリに保存されます。Firebase App Hosting は、イメージと構成を使用して、Cloud Run サービスに新しい Cloud Run リビジョンを追加します。
- Cloud Run リビジョンが完了し、正常であることを確認したら、Firebase App Hosting はトラフィック構成を変更して、すべての新しいリクエストを新しい Cloud Run リビジョンに転送します。これでロールアウトは完了です。
- Firebase App Hosting でホストされているウェブサイトにリクエストが送信されると、リクエストは Cloud CDN が有効になっている Google Cloud ロードバランサによって処理されます。キャッシュに保存されていないリクエストは、Cloud Run サービスに送信されます。
実装パス
|
Firebase を設定する |
Firebase プロジェクトをまだ作成していない場合は、Firebase プロジェクトを作成し、Blaze 料金プランが有効になっていることを確認します。 |
|
App Hostingを設定 |
Firebase コンソールまたは Firebase CLI を使用して、App Hosting バックエンドを作成します。これは、アプリの GitHub リポジトリへの接続など、アプリの管理対象リソースのコレクションです。 |
|
アプリの管理とモニタリング |
App Hosting バックエンドを作成すると、アプリは無料のサブドメインで利用可能になります。ロールアウトの詳細は、Firebase コンソールで確認できます。Google Cloud コンソールを使用して、ログの表示や検索を行うことができます。 |
|
アプリを開発する |
App Hosting は、ライブブランチに commit が push されるたびに、新しいロールアウトを自動的に開始します。 |
次のステップ
- アプリのデプロイを開始する。
- ホストされたアプリを Firebase Authentication と Google AI 機能(Next.js | Angular)と統合する App Hosting Codelab をお試しください。}
- App Hosting でサポートされているさまざまなコミュニティ サポート フレームワークについて学習する。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-08 UTC。
[null,null,["最終更新日 2025-08-08 UTC。"],[],[],null,["Firebase App Hosting \nplat_web \n\nFirebase App Hosting streamlines the development and deployment of dynamic\nweb apps, offering GitHub integration and integration with other Firebase\nproducts like Authentication, Cloud Firestore, and Firebase AI Logic.\nApp Hosting has built-in, preconfigured support for Next.js and Angular\nas well as broader support for various popular web frameworks.\n\n[Get started](/docs/app-hosting/get-started)\n\nKey capabilities\n\n|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| GitHub integration | A git commit is all that's needed to roll out a new version of your app. App Hosting can automatically deploy every time you push to a specific branch. |\n| Backed by Google Cloud | App Hosting uses Google Cloud Terms of Service, and deploys your app to Google Cloud products you trust. Apps are built with Cloud Build, served on Cloud Run, and cached in Cloud CDN. Integrated services like Cloud Secret Manager keep your API keys safe. |\n| Ship AI-powered features at scale | Start with AI samples that use Gemini. Protect your API endpoint's API key with Cloud Secret Manager and leverage App Hosting's streaming support to maintain fast initial load times as you add generative AI features into your app. |\n| Firebase console integration | Monitor your builds and rollouts in the Firebase console so you always know what's going on. Access logs and metrics, add a custom domain, and manually trigger rollouts from the Firebase console. |\n\nHow does it work?\n\n1. Using the Firebase console or Firebase CLI, authorize and install the Firebase GitHub app on your repository.\n2. Still in the Firebase console or Firebase CLI, create a Firebase App Hosting backend, with a repository and live branch for continuous deployment. App Hosting creates a default rollout policy for your backend to roll out to 100% of traffic immediately when a change is pushed to the target branch.\n3. When a commit is pushed to your live branch, Google Cloud Developer Connect sends an event to Firebase App Hosting.\n4. Responding to this event, Firebase App Hosting creates a new build for the backend connected to the repository.\n 1. First, Firebase App Hosting creates a new Cloud Build build for your commit. In this job, [Google Cloud buildpacks](https://cloud.google.com/docs/buildpacks/overview) determine which framework is being used in your application to create a container and configuration (including environment variables, secrets, minimum or maximum instances, concurrency memory, CPU, and VPC configuration) that suits your application. See [the App Hosting build process](/docs/app-hosting/build) For more information.\n 2. When the Cloud Build job is complete, your container is stored in an Artifact Registry repository dedicated to Firebase App Hosting. Firebase App Hosting then adds a new Cloud Run Revision to a Cloud Run service using your image and configuration.\n5. Once your Cloud Run Revision is complete and verified healthy, Firebase App Hosting modifies its traffic configuration to point all new requests to your new Cloud Run Revision. At this point, the rollout is complete.\n6. When a request is sent to a website hosted on Firebase App Hosting, the request is served by Google Cloud Load Balancer with Cloud CDN enabled. Uncached requests are sent to your Cloud Run service.\n\nImplementation path\n\n|---|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | Set up Firebase | If you don't already have one, create a Firebase project and make sure it has the Blaze pricing plan enabled. |\n| | Set up App Hosting | With the Firebase console or the Firebase CLI, create an App Hosting backend. This is the collection of managed resources for your app, including the connection to the GitHub repository for your app. |\n| | Manage and monitor your app | When you finish creating an App Hosting backend, your app is available on its free subdomain, and you can view details about the rollout in the Firebase console. You can use the [Google Cloud console](https://console.cloud.google.com/logs/query?project=_) to view and search through your logs. |\n| | Develop your app | App Hosting automatically starts a new rollout every time a commit is pushed to your live branch. |\n\nNext steps\n\n- [Get started](/docs/app-hosting/get-started) deploying apps.\n- Try an App Hosting codelab that integrates a hosted app with Firebase Authentication and Google AI features: [Next.js](https://firebase.google.com/codelabs/firebase-nextjs) \\| [Angular](https://firebase.google.com/codelabs/firebase-web).}\n- Learn more about the various [community-supported frameworks](https://firebaseopensource.com/platform/app_hosting) supported by App Hosting."]]