Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Experimental addon to the Firebase CLI to add web framework support

License

NotificationsYou must be signed in to change notification settings

FirebaseExtended/firebase-framework-tools

Repository files navigation

Overview

App Hosting provides configuration-free build and deploy support for Web apps developed in these frameworks:

  • Next.js 13+
  • Angular 17.2+

This repo holds the code for the adapters that enable support for these frameworks. At a high level these adapters transform framework specific configurations into anoutput bundle spec that App Hosting can use to configure frameworks support. For more information seeFramework integration.

App Hosting output bundle

The App Hosting output bundle is a file based specification that allows different frameworks to configure and customize their App Hosting deployment for enhanced support.

Any framework that can generate a build output in accordance with the App Hosting output bundle can be deployed on App Hosting.

The output bundle primarily consists of abundle.yaml file that sits inside of the.apphosting directory. This bundle.yaml contains all the ways that frameworks can configure App Hosting when users deploy their applications.

Note

App Hosting technically supports all node applications, but no custom framework features will be enabled without the output bundle.

Output bundle Schema

The output bundle is contained in a single file:

.apphosting/bundle.yaml

As long as this file exists and follows the schema, App Hosting will be able to process the build properly.

The schema can also be found insource

interfaceOutputBundle{version:"v1"runConfig:RunConfig;metadata:Metadata;outputFiles?:OutputFiles;}

Version

Theversion represents which output bundle version is currently being used. The current version is v1.

RunConfig

TherunConfig fields configures the Cloud Run service associated with the App Hosting Backend.

interfaceRunConfig{runCommand:string;environmentVariables?:EnvVarConfig[];concurrency?:number;cpu?:number;memoryMiB?:number;minInstances?:number;maxInstances?:number;}
FieldTypeDescriptionRequired?
runCommandstringCommand to start the server (e.g.node dist/index.js). Assume this command is run from the root dir of the workspace. This should be the productionized version of the server start command.y
environmentVariablesEnvVarConfig[]Environment variables present in the server execution environment.n
concurrencynumberThe maximum number of concurrent requests that each server instance can receive.n
cpunumberThe number of CPUs used in a single server instance.n
memoryMiBnumberThe amount of memory available for a server instance.n
minInstancenumberThe limit on the minimum number of function instances that may coexist at a given time.n
MaxInstancenumberThe limit on the maximum number of function instances that may coexist at a given time.n

Many of these fields are shared withapphosting.yaml. See therunConfig reference documentation for additional context and default values.

EnvVarConfig

interfaceEnvVarConfig{variable:string;value:string;availability:'RUNTIME'}
FieldTypeDescriptionRequired?
variablestringName of the environment variabley
valuestringValue associated with the environment variabley
availabilityRUNTIMEWhere the variable will be available. For now this will always beRUNTIMEy

Metadata

interfaceMetadata{adapterPackageName:string;adapterVersion:string;framework:string;frameworkVersion?:string;}
FieldTypeDescriptionRequired?
adapterPackageNamestringName of the adapter (this should be the npm package name)y
adapterVersionstringVersion of the adaptery
frameworkstringName of the framework that is being supportedy
frameworkVersionstringVersion of the framework that is being supportedn

OutputFiles

OutputFiles is an optional field to configure outputFiles and optimize server files + static assets.

interfaceOutputFiles{serverApp:ServerApp}
FieldTypeDescriptionRequired?
serverAppServerAppServerApp holds configurations related to the serving files at runtime from Cloud Runy

ServerApp

OutputFiles is an optional field to configure outputFiles and optimize server files + static assets.

interfaceServerApp{include:string[]}
FieldTypeDescriptionRequired?
includestring[]include holds a list of directories + files relative to the app root dir that frameworks need to deploy to the App Hosting server, generally this will be the output/dist directory (e.g. .output or dist). In the case that the framework wants to include all files they can use [“.”]y

Sample

Here is a sample.apphosting/bundle.yaml file putting all this together:

version:v1runConfig:runCommand:node dist/index.jsenvironmentVariables:    -variable:VARvalue:8080availability:RUNTIMEconcurrency:80cpu:2memoryMiB:512minInstances:0maxInstances:14outputFiles:serverApp:include:       -dist      -.outputmetadata:adapterPackageName:npm-nameadapterVersion:12.0.0framework:framework-nameframeworkVersion:1.0.0

As long as you have thebundle.yaml in this format, App Hosting will be able to deploy any framework that supports server side rendering.


[8]ページ先頭

©2009-2025 Movatter.jp