什么是具有多个阶段(登台,开发,生产)的最佳Google App Engine部署策略?

时间:2018-10-20 17:46:15

标签: google-app-engine deployment google-cloud-platform environment

我一直在研究App Engine文档,并试图找到一种最佳的方法来部署到多个环境中,但是还没有找到任何具体的方法。

我想知道想法和最佳做法。我有一个Laravel API项目和两个有角度的前端项目。我曾经使用过gitlab CI / CD,并且已经在不同的服务器上设置了多个环境。现在,我在Google App Engine上进行所有这些操作,这使我对部署工作流程有疑问。

我当前用于AE的app.yaml:

service: laravel-app-dev
runtime: php
env: flex

runtime_config:
  document_root: public

# Ensure we skip ".env", which is only for local development
skip_files:
- .env
- .git
- node_modules
- vendor

env_variables:
  # Put production environment variables here.
  APP_LOG: errorlog
  APP_ENV: local
  APP_DEBUG: true
  APP_KEY: asdfasdfasdasd
  STORAGE_DIR: /tmp
  ## Set these environment variables according to your CloudSQL configuration.
  DB_HOST: localhost
  DB_DATABASE: laravel56-dev
  DB_USERNAME: [username]
  DB_PASSWORD: [password]
  DB_SOCKET: "[mysql_id]"

beta_settings:
  # for Cloud SQL, set this value to the Cloud SQL connection name,
  # e.g. "project:region:cloudsql-instance"
  cloud_sql_instances: "[mysql_id]"

拥有多个环境支持的最佳实践是什么?

0 个答案:

没有答案