קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
Firebase App Hosting משתמש ב-Cloud Build כדי להפוך את קוד המקור של האפליקציה לפורמט של קונטיינר שמתאים לפריסה ב-Cloud Run.
תהליך הבנייה פועל בשלבים העיקריים הבאים:
הטמעה: איסוף של קוד המקור וההגדרה של האפליקציה.
Build (בנייה): מתקין את יחסי התלות ובונה את האפליקציה.
העברה: השלב שבו מאשרים את מאגר התגים Cloud Run לסביבת הייצור.
שלושת השלבים האלה תואמים ישירות לשלבי הבנייה 1, 2 ו-3 שמוצגים ב-Cloud Build במסוף Google Cloud:
שלב הטמעת הנתונים
השלב הזה אחראי לטיפול בלוגיקה שלפני הבנייה. הוא קורא, מנקה וכותב משתני סביבה שהוגדרו על ידי המשתמש. בנוסף, הוא מבטל את ההפניה לכל סוד שצוין בקובץ apphosting.yaml ומצמיד אותו.
שלב הבנייה
זהו ליבת תהליך ה-build, שאחראית ליצירת קובץ אימג' בקונטיינר שאפשר להריץ וקובץ bundle.yaml שמגדיר את תצורת ה-build.
הוא משתמש ב-Cloud Native Buildpacks כדי לארוז את האפליקציה בצורה יעילה. מידע נוסף על קובץ bundle.yaml זמין ב-github.
ה-buildpacks אחראים להמיר את קוד המקור של האפליקציה לקובצי אימג' בקונטיינרים שמוכנים לייצור. Firebase App Hosting chains together
several buildpacks to complete the build process:
Monorepo Buildpack: מגדיר buildpacks עוקבים לטיפול בתרחישים שונים של monorepo.
Framework Buildpack: מתקין את מתאם המסגרת הנכון (כמו Angular או Next.js) ומכין את ה-buildpacks הבאים.
מתאמי המסגרת אחראים להרצת פקודת ה-build של הסביבה הפרודקטיבית ולמיפוי של ערכי תצורה רלוונטיים שספציפיים למסגרת לפורמט סטנדרטי שניתן לקריאה על ידי App Hosting.
Package Manager Buildpack: מריץ את ההתקנה של יחסי התלות ובונה את האפליקציה באמצעות npm, yarn או pnpm.
Output Bundle Buildpack: מגדיר את פקודת ההפעלה ומכין את חבילת הפלט להרצה.
שלב ההעברה
בשלב הסופי הזה, כל המידע שחולץ מקוד המקור של האפליקציה, בתוספת קובץ האימג' של קונטיינר הבנייה, נארז ונשלח אל ה-backend של App Hosting. הקצה העורפי App Hosting משתמש במידע הזה כדי להגדיר את Cloud Run עם ההגדרות המתאימות.
[[["התוכן קל להבנה","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"]],["עדכון אחרון: 2025-08-31 (שעון UTC)."],[],[],null,["\u003cbr /\u003e\n\nFirebase App Hosting utilizes Cloud Build to transform your\napplication source code into a containerized format suitable for deployment on\nCloud Run.\n\nThe build process operates through the following key stages:\n\n1. **Ingest**: Gathers your application source code and configuration.\n\n2. **Build**: Installs dependencies and builds your application.\n\n3. **Handoff** : Finalizes the production Cloud Run container.\n\nThese three steps correspond directly to build steps 1, 2 and 3 as displayed in\nCloud Build in the Google Cloud Console:\n\nIngest stage\n\nThis stage is responsible for handling pre-build logic. It reads, sanitizes, and\nwrites user-defined environment variables. It also dereferences and pins any\nsecrets specified in the `apphosting.yaml` file.\n\nBuild stage\n\nThis is the core of the build process, responsible for generating a runnable\ncontainer image and a `bundle.yaml` file defining your build configuration.\nIt utilizes [Cloud Native Buildpacks](https://cloud.google.com/docs/buildpacks/overview)\nto package the\napplication efficiently. More information on the `bundle.yaml`file can be found\non [github](https://github.com/FirebaseExtended/firebase-framework-tools).\n\nBuildpacks are responsible for transforming your application source code into\nproduction ready container images. Firebase App Hosting chains together\nseveral buildpacks to complete the build process:\n\n1. **Runtime Buildpack**: Ensures all necessary components for running a basic Node.js application are included and dependencies are installed.\n2. **Monorepo Buildpack**: Configures subsequent buildpacks to handle different monorepo scenarios.\n3. **Framework Buildpack**: Installs the correct framework adapter (like\n Angular or Next.js) and prepares subsequent buildpacks.\n\n Framework adapters are in charge of running the productionized build\n command and mapping any relevant framework-specific config values to a\n standard format readable by App Hosting.\n4. **Package Manager Buildpack**: Executes the installation of dependencies and\n builds the app using npm, yarn, or pnpm.\n\n5. **Output Bundle Buildpack**: Defines the run command and prepares the output\n bundle for execution.\n\nHandoff stage\n\nThis final stage packages all the information extracted from the application\nsource code plus the build container image and sends it to the App Hosting\nbackend. The App Hosting backend then uses this information to set up\nCloud Run with the proper configurations.\n\nLearn more\n\nThe entire App Hosting build process is open source.\n\n- The buildpack code is in [the Google Cloud buildpacks repo](https://github.com/GoogleCloudPlatform/buildpacks)\n- Code for framework adapters is in the [firebase-framework-tools repo](https://github.com/FirebaseExtended/firebase-framework-tools)\n- Learn more about [Cloud Native buildpacks](https://cloud.google.com/docs/buildpacks/overview) and [Cloud Build](https://cloud.google.com/build/docs/overview)"]]