# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
# App Engine Flex configuration for the Genkit + ASGI sample.
#
# Deploy:
# gcloud app deploy --project=<PROJECT_ID>
#
# Set the API key as an environment variable in the GCP console
# or via: gcloud app deploy --set-env-vars GEMINI_API_KEY=<key>
#
# App Engine Flex uses the Containerfile in this directory to build the app.
# The PORT environment variable is automatically set by App Engine.
runtime: custom
env: flex
# Use a small instance to keep costs low for a demo.
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
# Scale to zero when idle (useful for demos).
automatic_scaling:
min_num_instances: 0
max_num_instances: 2
# Health check configuration — matches the /health endpoint.
liveness_check:
path: /health
check_interval_sec: 30
readiness_check:
path: /health
check_interval_sec: 5