All skills
firebase avatar

/firebase-app-hosting-basics

@073edf7 official
by firebasefirebase/agent-skills461 stars
102

Deploys and manages full-stack web applications (Next.js, Angular) with Server-Side Rendering (SSR) using Firebase App Hosting. Use when deploying Next.js/Angular apps, configuring apphosting.yaml or firebase.json apphosting blocks, managing secrets, setting up GitHub CI/CD, or configuring Blaze billing requirements. Don't use for classic static web hosting, Auth, Firestore, Crashlytics, or Xcode.

Use this Skill: https://skilld.dev/gh/firebase/agent-skills/firebase-app-hosting-basics

This session only. Nothing lands on disk.

referencesconfiguration.md

≈436 tokens on demand. Your agent reads this file only when SKILL.md points to it.

App Hosting Configuration (apphosting.yaml)

The apphosting.yaml file is the source of truth for your backend's configuration. It must be located in the root of your app's directory (or the specific root directory if using a monorepo).

File Structure

# apphosting.yaml

# Cloud Run service configuration
runConfig:
  cpu: 1
  memoryMiB: 512
  minInstances: 0
  maxInstances: 100
  concurrency: 80

# Environment variables
env:
  - variable: STORAGE_BUCKET
    value: mybucket.app
    availability:
      - BUILD
      - RUNTIME
  - variable: API_KEY
    secret: myApiKeySecret

runConfig

Controls the resources allocated to the Cloud Run service that serves your app.

  • cpu: Number of vCPUs. Note: If < 1, concurrency MUST be set to 1.
  • memoryMiB: RAM in MiB (128 to 32768).
  • minInstances: Minimum containers to keep warm (default 0). Set to >= 1 to avoid cold starts.
  • maxInstances: Maximum scaling limit (default 100).
  • concurrency: Max concurrent requests per instance (default 80).

Resource Constraints

  • CPU vs Memory: Higher memory often requires higher CPU.
    • 4GiB RAM -> Needs >= 2 vCPU

    • 8GiB RAM -> Needs >= 4 vCPU

env (Environment Variables)

Defines environment variables available during build and/or runtime.

  • variable: The name of the env var (e.g., NEXT_PUBLIC_API_URL).
  • value: A literal string value.
  • secret: The name of a secret in Cloud Secret Manager. use npx -y firebase-tools@latest apphosting:secrets:set to create these.
  • availability: Where the variable is needed.
    • BUILD: Available during the npm run build process.
    • RUNTIME: Available when the app is serving requests.
    • Defaults to both if not specified.

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides instructions for managing Firebase App Hosting using official tools and CLI commands. It uses resources from the trusted vendor (Firebase) for deployment, secret management, and project configuration. The behaviors described are standard for the skill's stated purpose and do not represent a security risk beyond the typical surface for development tools.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    2/4 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 073edf7. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 months ago
metadata
{
  "category": "Serverless"
}

README badge

README badge for firebase/agent-skills/firebase-app-hosting-basics