GCP App Engine上的Foreman应用程序启动错误

时间:2018-10-02 18:17:14

标签: google-app-engine google-cloud-platform foreman

在介绍Foreman之前,我已经成功部署了Rails应用程序。我当时使用的是this guide,但是尝试了几种变体,这就是我现在的位置。

app.yml:

entrypoint: bundle exec foreman start
env: flex
runtime: ruby

Procfile:

web: bundle exec puma -C config/puma.rb
worker: bundle exec sidekiq -q default -q mailers

Stacktrace:

Updating service [default] (this may take several minutes)...failed.                                                                                      
ERROR: (gcloud.app.deploy) Error Response: [9] 
Application startup error:
bundler: failed to load command: foreman (/app/vendor/bundle/ruby/2.4.0/bin/foreman)
ArgumentError: wrong number of arguments (given 1, expected 2)
  /app/vendor/bundle/ruby/2.4.0/gems/dotenv-2.4.0/lib/dotenv/environment.rb:7:in `initialize'
  /app/vendor/bundle/ruby/2.4.0/gems/foreman-0.63.0/lib/foreman/engine.rb:172:in `new'
  /app/vendor/bundle/ruby/2.4.0/gems/foreman-0.63.0/lib/foreman/engine.rb:172:in `load_env'
  /app/vendor/bundle/ruby/2.4.0/gems/foreman-0.63.0/lib/foreman/cli.rb:136:in `load_environment!'
  /app/vendor/bundle/ruby/2.4.0/gems/foreman-0.63.0/lib/foreman/cli.rb:38:in `start'
  /app/vendor/bundle/ruby/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
  /app/vendor/bundle/ruby/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
  /app/vendor/bundle/ruby/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
  /app/vendor/bundle/ruby/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
  /app/vendor/bundle/ruby/2.4.0/gems/foreman-0.63.0/bin/foreman:7:in `<top (required)>'
  /app/vendor/bundle/ruby/2.4.0/bin/foreman:22:in `load'
  /app/vendor/bundle/ruby/2.4.0/bin/foreman:22:in `<top (required)>'

当我不使用工头(例如bundle exec rackup --port $PORT)进行部署时,它将按预期部署并运行。

我尝试将entrypoint设置为:bundle exec foreman start -m web=1,worker=2…我不知道它还会期望什么其他参数。

0 个答案:

没有答案