Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Aplikasi App Engine dikonfigurasi menggunakan file app.yaml, yang berisi resource CPU, memori, jaringan dan disk, penskalaan, dan setelan umum lainnya, termasuk variabel lingkungan.
Tentang file app.yaml
Anda dapat menentukan konfigurasi runtime untuk aplikasi Runtime Kustom,
termasuk versi dan URL, dalam file app.yaml. File ini berfungsi sebagai
deskripsi deployment versi layanan tertentu.
Anda harus membuat file app.yaml terlebih dahulu untuk layanan default aplikasi Anda sebelum dapat membuat dan men-deploy file app.yaml untuk layanan tambahan.
runtime:customenv:flex
Bergantung pada kompleksitas layanan aplikasi, Anda mungkin hanya perlu mendefinisikan
beberapa elemen dalam file app.yaml yang sesuai. Contoh berikut
menunjukkan hal yang mungkin diperlukan aplikasi Runtime Kustom sederhana di
lingkungan yang fleksibel:
Anda dapat menentukan nama unik untuk file app.yaml, tetapi juga harus
menentukan nama file dengan perintah
deployment. Misalnya, jika Anda menamai file app.yaml sebagai service-name-app.yaml
atau app.flexible.yaml, Anda harus men-deploy aplikasi menggunakan:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-11 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eapp.yaml\u003c/code\u003e file configures an App Engine app, defining resources like CPU, memory, network, disk, scaling, environment variables, and general settings.\u003c/p\u003e\n"],["\u003cp\u003eIt serves as a deployment descriptor, defining runtime configurations, versions, and URLs for a specific service version within your app.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eapp.yaml\u003c/code\u003e file for the \u003ccode\u003edefault\u003c/code\u003e service must be created first before other \u003ccode\u003eapp.yaml\u003c/code\u003e files for additional services.\u003c/p\u003e\n"],["\u003cp\u003eYou can use a unique name for \u003ccode\u003eapp.yaml\u003c/code\u003e files, but you must specify this file name in the deployment command, such as \u003ccode\u003egcloud app deploy service-name-app.yaml\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe flexible environment allows for custom runtime configuration in the \u003ccode\u003eapp.yaml\u003c/code\u003e file, and its complexity determines how many elements you need to specify.\u003c/p\u003e\n"]]],[],null,["# Configuring your app with app.yaml\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\nAn App Engine app is configured using an `app.yaml`\nfile, that contains CPU, memory, network and disk resources, scaling, and other\ngeneral settings including environment variables.\n\n\nAbout `app.yaml` files\n----------------------\n\n\u003cbr /\u003e\n\nYou can specify the runtime configuration for your Custom Runtime app, including versions and URLs, in the `app.yaml` file. This file acts as a deployment descriptor of a specific service version. You must first create the `app.yaml` file for the `default` service of your app before you can create and deploy `app.yaml` files for additional services.\n\n\n runtime: custom\n env: flex\n\nDepending on the complexity of your app's service, you might only need to define a few elements in the corresponding `app.yaml` file. The following example demonstrates what a simple Custom Runtime app might require in the flexible environment:\n\nYou can specify a unique name for your `app.yaml` files, but then you must\nspecify the file name with the [deployment\ncommand](/appengine/docs/flexible/testing-and-deploying-your-app)\nas well. For example, if you name your `app.yaml` file `service-name-app.yaml`\nor `app.flexible.yaml`, then you must deploy your app using either: \n\n gcloud app deploy service-name-app.yaml\n gcloud app deploy app.flexible.yaml\n\n\u003cbr /\u003e\n\nAll configuration elements\n--------------------------\n\nFor a complete list of all the supported elements in this configuration file,\nsee the\n[`app.yaml` reference](/appengine/docs/flexible/reference/app-yaml)."]]