我正在使用 google cloud build 部署我的 rails 应用程序。最近我将 ruby 版本升级到了 3.2。我在 app.yaml 中使用 foreman 作为入口点,没有参数,并添加了我觉得 ruby 3.2 所必需的 Runtime_config(根据 Google 文档)。
以下是app.yaml的代码片段:
runtime: ruby
entrypoint: bundle exec foreman start
env: flex
runtime_config:
operating_system: "ubuntu22"
现在我收到以下错误:
Step #1: Step #2 - "build": === Ruby - Flex Entrypoint ([email protected]) ===
Step #1: Step #2 - "build": Using entrypoint bundle exec foreman start -o 0.0.0.0
Step #1: ERROR: (gcloud.app.deploy) Error Response: [9] An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>2024-01-03T08:36:50.619Z16311.wm.1: ERROR: "foreman start" was called with arguments ["-o", "0.0.0.0"]
Step #1: Usage: "foreman start [PROCESS]"
Step #1:
Finished Step #1
ERROR
ERROR: build step 1 "gcr.io/google.com/cloudsdktool/cloud-sdk" failed: step exited with non-zero status: 1
不知何故,它将参数“-o 0.0.0.0”添加到 foreman 启动命令中。
我不希望构建添加参数。我尝试添加自己的参数,但结果如下:
Step #1: Step #2 - "build": === Ruby - Flex Entrypoint ([email protected]) ===
Step #1: Step #2 - "build": Using entrypoint bundle exec foreman start -m "web=1,worker=1" -o 0.0.0.0
使用 ruby 2.7 一切正常:
Step #1: Step #1: ## Command to start application.
Step #1: Step #1: CMD exec bundle exec foreman start
为什么 Google buildpack 会添加此参数?我该如何删除它?这是一个错误吗?