runを実行gcloud help preview app run
すると、run コマンドとそのパラメーターを説明する man ページを表示できます。--custom-entrypoint
は次のように説明されています。
--custom-entrypoint CUSTOM_ENTRYPOINT
Specify an entrypoint for custom runtime modules. This is required when
such modules are present. Include "{port}" in the string (without
quotes) to pass the port number in as an argument. For instance:
--custom_entrypoint="gunicorn -b localhost:{port} mymodule:application"
エラー メッセージには--custom_entrypoint
アンダースコア付きの が表示されますが、パラメータは--customer_entrypoint
ダッシュ付きの であることに注意してください。正しい名前は--custom-entrypoint
次を参照してください: https://code.google.com/p/google-cloud-sdk/issues/detail?id=191
nodejs の場合、次のようなものを使用できるはずです。
gcloud preview app run app.yaml --project=your-project-id --custom-entrypoint "node index.js {port}"
アプリケーションの起動方法によって異なります。ポートは環境変数 PORT としても利用できるようですので{port}
、アプリがコマンドライン引数を処理しない場合は使用する必要はありません。
しかし、私は使用npm start
することができませんでした。npm run <script>
--custom-entrypoint