部署及代管內容導向網頁應用程式
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
如要開始使用,您必須先選取主機供應商,並部署網頁應用程式。
部署應用程式
網頁應用程式的部署作業,是讓應用程式在代管環境中正常運作及存取的過程,目的是讓網路上的使用者能夠存取您的應用程式。各種部署策略可用於內容導向應用程式,包括使用容器、VM 或邊緣運算建構無伺服器應用程式。
確保應用程式在實際工作環境中順暢、可靠且安全運作的重要考量因素包括:
考量重點 |
伺服器準備 |
準備部署應用程式的網路伺服器或託管環境。事前準備包括佈建 VM、設定雲端執行個體或完成設定。 |
程式碼部署 |
將應用程式程式碼和所有相關檔案傳輸或上傳至伺服器。請使用安全的檔案傳輸通訊協定 (例如 SFTP 或 SCP)、供應商提供的工具,或是與建構管道或建構系統的整合。確保應用程式在伺服器上妥善組織應用程式的程式碼,並考慮使用版本管控系統來管理程式碼變更和部署作業。 |
環境設定 |
根據實際工作環境需求調整配置設定、伺服器參數和環境變數。 |
測試 |
在實際工作環境中完成測試,確認已部署的應用程式可以正常運作。測試項目包括功能測試、安全性測試和效能測試。 |
說明文件策略 |
保留部署程序的詳細說明文件,包括所有設定、依附元件和資源調度和維護的必要程序。 |
網頁應用程式部署在應用程式建構週期中是相當重要的階段。妥善規劃及策略執行對於應用程式的安全性、可用性和整體效能至關重要。
代管選項
根據您的部署技術、轉譯方法、CDN 需求,以及應用程式對於可靠性、彈性、擴充性和其他重要因素的需求,請考慮最適合您應用程式的託管平台。
以下範例說明如何考慮為應用程式使用 Firebase 託管。
Firebase 託管
Firebase 託管是 Google 以 Firebase 平台提供的網站託管服務。透過靜態和動態內容,您可以有效率地部署網頁應用程式,快速託管及提供網路專案。這項工具為網頁應用程式提供安全又快速的託管環境,包括 CDN、SSL 加密和自訂網域對應。此工具可讓您將網站的預覽版本部署至臨時網址,也能使用 GitHub 動作,自動為每個 PR 進行預覽。
Firebase 託管特別適合用來託管網頁應用程式、網站和單頁應用程式。能與其他 Firebase 服務完美整合,例如 Firebase 驗證和 Firebase 即時資料庫。您也可以透過 Firebase CLI 或第三方服務等工具設定 CI/CD 管道。
Firebase 託管提供安全、可擴充的全球託管解決方案,能與其他 Firebase 服務和開發工具整合,藉此簡化網站託管程序。這個資料庫非常適合想要快速有效率地部署網頁應用程式的開發人員,而不必管理複雜的基礎架構。
將 Cloud 函式連線至 Firebase 託管後,即可從同一個 Firebase 專案提供靜態和動態內容。這項整合提供靈活彈性的建構網頁應用程式,可將無伺服器的動態功能與靜態內容託管結合。您可以使用與 Firebase 網域相對的網址存取 Cloud Functions。這項整合特別適合用來建立同時具備用戶端和伺服器端功能的網頁應用程式。這項服務提供 Firebase 託管和無伺服器函式的整合,藉此簡化網頁應用程式的部署、託管和資源調度作業。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-07-10 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-07-10 (世界標準時間)。"],[[["Web application deployment involves making your application accessible online and requires careful planning for security, reliability, and performance."],["Key deployment considerations include server preparation, code deployment, environment configuration, testing, and documentation."],["Choose a hosting platform like Firebase Hosting based on your application's specific needs, such as rendering approach, CDN requirements, and desired scalability."],["Firebase Hosting offers a secure and efficient way to deploy web applications with both static and dynamic content, integrating seamlessly with other Firebase services."],["Firebase Hosting simplifies web hosting by providing a scalable and global solution that integrates with serverless functions and development tools for streamlined deployment."]]],["First, select a hosting provider and deploy your web application, ensuring it's accessible online. Key actions include: preparing the server environment, securely deploying code, configuring environment settings, and thoroughly testing. Document the deployment process, including configurations and maintenance procedures. Consider hosting options like Firebase Hosting, which offers secure, scalable hosting with CDN, SSL encryption, and integration with other Firebase services. It can host static content, single-page applications, and dynamic content using Cloud Functions.\n"]]