简体   繁体   中英

How to deploy 1 instance on Google App Engine

I need to deploy 1 instance of a simple Node.js application on Google App Engine, without any form of scaling.

I have tried doing gcloud preview app deploy , but that creates many instances even after I try to shut them down. My goal is to consume minimum resources by running only 1 instance.

I am using the simplest example: https://cloud.google.com/nodejs/getting-started/hello-world

Add these two lines to your app.yaml file:

manual_scaling:
  instances: 1

This will disable automatic scaling and set the maximum of instances to just one.

You can specify the settings for scaling when your configure your app . The Hello World example does not provide any scaling settings, so default values apply.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM