Skip to content
Advertisement

How to specify what bucket to upload the build too using gcloud or app.yaml

Im busy deploying a Strapi app to my gcloud App Engine but it seems to have randomly decided what bucket to upload the build too. Is there a way I can specify which of my buckets I want it to upload too?

I used the following command to deploy the build:

gcloud app deploy app.yaml --project kolektivo-backend

// app.yaml

runtime: nodejs16

service: vendors

instance_class: F1

env_variables:
  NODE_ENV: "production"
  INSTANCE_CONNECTION_NAME: "kolektivo-backend:us-central1:alfajores"

beta_settings:
  cloud_sql_instances: kolektivo-backend:us-central1:alfajores=tcp:5432

Advertisement

Answer

Based on the documentation of gcloud app deploy, you need to add a --bucket flag in your command in order to specify which bucket you want to build when deploying your app to Google App Engine. And if this argument is not specified on your command the application’s default code bucket is used.

Using this command:

gcloud app deploy --bucket=gs://my-bucket
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement