LoginSignup
4
3

More than 5 years have passed since last update.

app.yamlでリリースする環境を切り分ける(AppEngine)

Last updated at Posted at 2017-06-13

1つのソースで複数環境(プロジェクト)にリリースする方法を記録しておきます。

フォルダ構成

project
└─src
   └─module (リリースモジュール)
       ├─test.go
       ├─app_test.yaml    (開発環境用)
       ├─app_staging.yaml  (ステージング環境用)
       └─app_product.yaml  (本番環境用)

上記のように、環境ごとにapp.yamlを作成しapplicationを切り分けることでリリースするプロジェクトを切り分ける。
また、app.yamlに環境変数を設定することで環境ごとに設定を変更することができる。

リリースコマンド

# 開発環境にリリースする
goapp deploy app_test.yaml

# ステージング環境にリリースする
goapp deploy app_staging.yaml

# 本番環境にリリースする
goapp deploy app_product.yaml
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3